mirror of
https://github.com/samba-team/samba.git
synced 2025-01-04 05:18:06 +03:00
r1618: fixed the receipt of multi-part replies to SMBtrans2
(This used to be commit bd4106a8e5
)
This commit is contained in:
parent
0c55b8d8c2
commit
27ce337277
@ -303,6 +303,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
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user