summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-09-05 09:49:53 +0200
committerStefan Metzmacher <metze@samba.org>2011-09-05 18:01:07 +0200
commita44d3d176400d0c6500fc8d3c05ee73e930fd140 (patch)
tree2ba4746d074c8898d085dea4cf63c8f3bde7d5b9 /source3/libsmb
parent4dca2acfe43fda00637615548fecab1e3313b204 (diff)
downloadsamba-a44d3d176400d0c6500fc8d3c05ee73e930fd140.tar.gz
samba-a44d3d176400d0c6500fc8d3c05ee73e930fd140.tar.bz2
samba-a44d3d176400d0c6500fc8d3c05ee73e930fd140.zip
s3:smb2cli: make sure we don't try to send requests on a disconnected cli_state
metze
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/smb2cli_base.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/libsmb/smb2cli_base.c b/source3/libsmb/smb2cli_base.c
index f088ceaacd..7f4b176572 100644
--- a/source3/libsmb/smb2cli_base.c
+++ b/source3/libsmb/smb2cli_base.c
@@ -22,6 +22,7 @@
#include "client.h"
#include "read_smb.h"
#include "smb2cli_base.h"
+#include "libsmb/proto.h"
#include "lib/async_req/async_sock.h"
#include "lib/util/tevent_ntstatus.h"
@@ -260,6 +261,10 @@ NTSTATUS smb2cli_req_compound_submit(struct tevent_req **reqs,
state = tevent_req_data(reqs[i], struct smb2cli_req_state);
+ if (!cli_state_is_connected(state->cli)) {
+ return NT_STATUS_CONNECTION_DISCONNECTED;
+ }
+
if (state->cli->smb2.mid == UINT64_MAX) {
return NT_STATUS_CONNECTION_ABORTED;
}