summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-09-23 22:47:33 +0200
committerStefan Metzmacher <metze@samba.org>2011-09-29 22:15:06 +0200
commit8daf9df5148bc3977c676e4dec3263486d35fde9 (patch)
treeb38092d2c10ae4f73e1d0e6706a59fe7f241a3b7
parent24d53ebe441510805ff3e15696fa763c1bb96423 (diff)
downloadsamba-8daf9df5148bc3977c676e4dec3263486d35fde9.tar.gz
samba-8daf9df5148bc3977c676e4dec3263486d35fde9.tar.bz2
samba-8daf9df5148bc3977c676e4dec3263486d35fde9.zip
s3:smb2cli: fix the num_expected == 0 logic in smb2cli_req_recv()
metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Thu Sep 29 22:15:06 CEST 2011 on sn-devel-104
-rw-r--r--source3/libsmb/smb2cli_base.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/source3/libsmb/smb2cli_base.c b/source3/libsmb/smb2cli_base.c
index f8b2f6e5df..b85158f8c7 100644
--- a/source3/libsmb/smb2cli_base.c
+++ b/source3/libsmb/smb2cli_base.c
@@ -690,9 +690,8 @@ NTSTATUS smb2cli_req_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
bool found_size = false;
size_t i;
- if (num_expected == 0) {
- found_status = true;
- found_size = true;
+ if (piov != NULL) {
+ *piov = NULL;
}
if (tevent_req_is_nterror(req, &status)) {
@@ -710,6 +709,11 @@ NTSTATUS smb2cli_req_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
return status;
}
+ if (num_expected == 0) {
+ found_status = true;
+ found_size = true;
+ }
+
status = NT_STATUS(IVAL(state->recv_iov[0].iov_base, SMB2_HDR_STATUS));
body_size = SVAL(state->recv_iov[1].iov_base, 0);