diff options
author | Volker Lendecke <vlendec@samba.org> | 2007-08-03 14:33:38 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:29:16 -0500 |
commit | 9f3062d8a7abd904cf75da58553bdd34bc106e56 (patch) | |
tree | 0a32b0384276272d971fc0eb7ef571866651f1e9 /source3 | |
parent | 1d8851f4c734b65312baae042d12c014a8fe88c5 (diff) | |
download | samba-9f3062d8a7abd904cf75da58553bdd34bc106e56.tar.gz samba-9f3062d8a7abd904cf75da58553bdd34bc106e56.tar.bz2 samba-9f3062d8a7abd904cf75da58553bdd34bc106e56.zip |
r24160: process_trans2 in smbd/blocking.c used send_trans2_replies.
Fake a struct smb_request here.
Volker
(This used to be commit f712d1c92bee024a165b5facabdac1e2c866d9b1)
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; |