mirror of
https://github.com/samba-team/samba.git
synced 2025-08-02 00:22:11 +03:00
s4:libcli/composite: correctly finish composite smb and smb2 requests
Without this we would hang forever if the connection was already disconnected, instead of directly propagating NT_STATUS_CONNECTION_DISCONNECTED; Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
This commit is contained in:
committed by
Michael Adam
parent
5d1aecf12e
commit
4b6febc670
@ -167,6 +167,10 @@ _PUBLIC_ void composite_continue_smb(struct composite_context *ctx,
|
||||
void *private_data)
|
||||
{
|
||||
if (composite_nomem(new_req, ctx)) return;
|
||||
if (new_req->state > SMBCLI_REQUEST_RECV) {
|
||||
composite_error(ctx, new_req->status);
|
||||
return;
|
||||
}
|
||||
new_req->async.fn = continuation;
|
||||
new_req->async.private_data = private_data;
|
||||
}
|
||||
@ -177,6 +181,10 @@ _PUBLIC_ void composite_continue_smb2(struct composite_context *ctx,
|
||||
void *private_data)
|
||||
{
|
||||
if (composite_nomem(new_req, ctx)) return;
|
||||
if (new_req->state > SMB2_REQUEST_RECV) {
|
||||
composite_error(ctx, new_req->status);
|
||||
return;
|
||||
}
|
||||
new_req->async.fn = continuation;
|
||||
new_req->async.private_data = private_data;
|
||||
}
|
||||
|
Reference in New Issue
Block a user