summaryrefslogtreecommitdiff
path: root/source4/libcli
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-08-02 05:51:42 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:57:44 -0500
commit27ce337277211f7536b7bd750bb42b8a87089fc4 (patch)
tree4b0530c851b5a607e9703907a648a7460e0669c9 /source4/libcli
parent0c55b8d8c245ae4e418cb3d4341b4b5233828cad (diff)
downloadsamba-27ce337277211f7536b7bd750bb42b8a87089fc4.tar.gz
samba-27ce337277211f7536b7bd750bb42b8a87089fc4.tar.bz2
samba-27ce337277211f7536b7bd750bb42b8a87089fc4.zip
r1618: fixed the receipt of multi-part replies to SMBtrans2
(This used to be commit bd4106a8e57fc98d1feddc01b58f87f68164247a)
Diffstat (limited to 'source4/libcli')
-rw-r--r--source4/libcli/raw/rawrequest.c13
-rw-r--r--source4/libcli/raw/rawtrans.c5
2 files changed, 14 insertions, 4 deletions
diff --git a/source4/libcli/raw/rawrequest.c b/source4/libcli/raw/rawrequest.c
index ce6cd0a1a4..9c53c4b18c 100644
--- a/source4/libcli/raw/rawrequest.c
+++ b/source4/libcli/raw/rawrequest.c
@@ -304,6 +304,19 @@ BOOL cli_request_receive(struct cli_request *req)
/*
+ receive another reply to a request - this is used for requests that
+ have multi-part replies (such as SMBtrans2)
+*/
+BOOL cli_request_receive_more(struct cli_request *req)
+{
+ req->state = CLI_REQUEST_RECV;
+ DLIST_ADD(req->transport->pending_recv, req);
+
+ return cli_request_receive(req);
+}
+
+
+/*
handle oplock break requests from the server - return True if the request was
an oplock break
*/
diff --git a/source4/libcli/raw/rawtrans.c b/source4/libcli/raw/rawtrans.c
index fb2abf3e2d..5dde753368 100644
--- a/source4/libcli/raw/rawtrans.c
+++ b/source4/libcli/raw/rawtrans.c
@@ -180,10 +180,7 @@ NTSTATUS smb_raw_trans2_recv(struct cli_request *req,
if (total_data <= parms->out.data.length && total_param <= parms->out.params.length)
break;
- /* to receive more requests we need to mark this request as not received */
- req->in.buffer = NULL;
-
- if (!cli_request_receive(req)) {
+ if (!cli_request_receive_more(req)) {
req->status = NT_STATUS_UNSUCCESSFUL;
return cli_request_destroy(req);
}