svn commit: samba r24160 - in branches/SAMBA_3_2/source/smbd: .
vlendec at samba.org
vlendec at samba.org
Fri Aug 3 14:33:39 GMT 2007
Author: vlendec
Date: 2007-08-03 14:33:38 +0000 (Fri, 03 Aug 2007)
New Revision: 24160
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=24160
Log:
process_trans2 in smbd/blocking.c used send_trans2_replies.
Fake a struct smb_request here.
Volker
Modified:
branches/SAMBA_3_2/source/smbd/blocking.c
branches/SAMBA_3_2/source/smbd/trans2.c
Changeset:
Modified: branches/SAMBA_3_2/source/smbd/blocking.c
===================================================================
--- branches/SAMBA_3_2/source/smbd/blocking.c 2007-08-03 14:02:07 UTC (rev 24159)
+++ branches/SAMBA_3_2/source/smbd/blocking.c 2007-08-03 14:33:38 UTC (rev 24160)
@@ -511,8 +511,7 @@
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 @@
}
/* 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;
}
Modified: branches/SAMBA_3_2/source/smbd/trans2.c
===================================================================
--- branches/SAMBA_3_2/source/smbd/trans2.c 2007-08-03 14:02:07 UTC (rev 24159)
+++ branches/SAMBA_3_2/source/smbd/trans2.c 2007-08-03 14:33:38 UTC (rev 24160)
@@ -735,12 +735,12 @@
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;
More information about the samba-cvs
mailing list