summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-09-17 21:09:30 +0200
committerStefan Metzmacher <metze@samba.org>2011-09-18 05:33:10 +0200
commit2bb17dc23ebbd0b89d39d6d827ed073b8bf2c65d (patch)
treef38ad4731b1385a9be6f675e118940d46f1dd3dd /source3
parentbbe78ca5a217eeba69a1e9189d8922c637d124f7 (diff)
downloadsamba-2bb17dc23ebbd0b89d39d6d827ed073b8bf2c65d.tar.gz
samba-2bb17dc23ebbd0b89d39d6d827ed073b8bf2c65d.tar.bz2
samba-2bb17dc23ebbd0b89d39d6d827ed073b8bf2c65d.zip
s3:libsmb: return INTERNAL_ERROR if the request is in bad state when the caller ships it
metze
Diffstat (limited to 'source3')
-rw-r--r--source3/libsmb/async_smb.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source3/libsmb/async_smb.c b/source3/libsmb/async_smb.c
index 8336ec255a..efeb328dd9 100644
--- a/source3/libsmb/async_smb.c
+++ b/source3/libsmb/async_smb.c
@@ -539,6 +539,10 @@ NTSTATUS cli_smb_req_send(struct tevent_req *req)
struct cli_smb_state *state = tevent_req_data(
req, struct cli_smb_state);
+ if (!tevent_req_is_in_progress(req)) {
+ return NT_STATUS_INTERNAL_ERROR;
+ }
+
return cli_smb_req_iov_send(req, state, state->iov, state->iov_count);
}
@@ -993,6 +997,10 @@ NTSTATUS cli_smb_chain_send(struct tevent_req **reqs, int num_reqs)
iovlen = 0;
for (i=0; i<num_reqs; i++) {
+ if (!tevent_req_is_in_progress(reqs[i])) {
+ return NT_STATUS_INTERNAL_ERROR;
+ }
+
state = tevent_req_data(reqs[i], struct cli_smb_state);
iovlen += state->iov_count;
}