diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/smbd/blocking.c | 17 | ||||
-rw-r--r-- | source3/smbd/trans2.c | 12 |
2 files changed, 17 insertions, 12 deletions
diff --git a/source3/smbd/blocking.c b/source3/smbd/blocking.c index c6e174ae22..1a0a988ea7 100644 --- a/source3/smbd/blocking.c +++ b/source3/smbd/blocking.c @@ -511,8 +511,7 @@ Waiting....\n", static BOOL process_trans2(blocking_lock_record *blr) { - char *inbuf = blr->inbuf; - char *outbuf; + struct smb_request *req; char params[2]; NTSTATUS status; struct byte_range_lock *br_lck = do_lock(smbd_messaging_context(), @@ -541,12 +540,18 @@ static BOOL process_trans2(blocking_lock_record *blr) } /* We finally got the lock, return success. */ - outbuf = get_OutBuffer(); - construct_reply_common(inbuf, outbuf); - SCVAL(outbuf,smb_com,SMBtrans2); + + if (!(req = talloc(tmp_talloc_ctx(), struct smb_request))) { + blocking_lock_reply_error(blr, NT_STATUS_NO_MEMORY); + return True; + } + + init_smb_request(req, (uint8 *)blr->inbuf); + + SCVAL(req->inbuf, smb_com, SMBtrans2); SSVAL(params,0,0); /* Fake up max_data_bytes here - we know it fits. */ - send_trans2_replies(inbuf, outbuf, max_send, params, 2, NULL, 0, 0xffff); + send_trans2_replies_new(req, params, 2, NULL, 0, 0xffff); return True; } diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index 577524dedd..be4754ac08 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -735,12 +735,12 @@ int send_trans2_replies(const char *inbuf, return 0; } -static void send_trans2_replies_new(struct smb_request *req, - const char *params, - int paramsize, - const char *pdata, - int datasize, - int max_data_bytes) +void send_trans2_replies_new(struct smb_request *req, + const char *params, + int paramsize, + const char *pdata, + int datasize, + int max_data_bytes) { char *inbuf, *outbuf; int length, bufsize; |