diff options
author | Stefan Metzmacher <metze@samba.org> | 2014-08-28 11:05:23 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2014-09-19 09:15:10 +0200 |
commit | 4b6febc670812d688ce6b6edd3fa24e671959b5c (patch) | |
tree | 6e4437b5b5add24fb9f36dcd6ee1cfb0ce0cd90a /source4/libcli/composite | |
parent | 5d1aecf12e50e7bf4af03639797d832550f69502 (diff) | |
download | samba-4b6febc670812d688ce6b6edd3fa24e671959b5c.tar.gz |
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>
Diffstat (limited to 'source4/libcli/composite')
-rw-r--r-- | source4/libcli/composite/composite.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source4/libcli/composite/composite.c b/source4/libcli/composite/composite.c index 26cf5c80acc..e8ca6e46fc6 100644 --- a/source4/libcli/composite/composite.c +++ b/source4/libcli/composite/composite.c @@ -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; } |