svn commit: samba r24444 - in branches/SAMBA_3_2/source/smbd: .
vlendec at samba.org
vlendec at samba.org
Tue Aug 14 21:53:49 GMT 2007
Author: vlendec
Date: 2007-08-14 21:53:48 +0000 (Tue, 14 Aug 2007)
New Revision: 24444
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=24444
Log:
Convert reply_find[n]close to the new API
Modified:
branches/SAMBA_3_2/source/smbd/process.c
branches/SAMBA_3_2/source/smbd/trans2.c
Changeset:
Modified: branches/SAMBA_3_2/source/smbd/process.c
===================================================================
--- branches/SAMBA_3_2/source/smbd/process.c 2007-08-14 21:32:52 UTC (rev 24443)
+++ branches/SAMBA_3_2/source/smbd/process.c 2007-08-14 21:53:48 UTC (rev 24444)
@@ -742,8 +742,8 @@
/* 0x31 */ { NULL, NULL, NULL, 0 },
/* 0x32 */ { "SMBtrans2", NULL,reply_trans2, AS_USER | CAN_IPC },
/* 0x33 */ { "SMBtranss2", NULL,reply_transs2, AS_USER},
-/* 0x34 */ { "SMBfindclose", reply_findclose,NULL,AS_USER},
-/* 0x35 */ { "SMBfindnclose", reply_findnclose,NULL, AS_USER},
+/* 0x34 */ { "SMBfindclose", NULL,reply_findclose,AS_USER},
+/* 0x35 */ { "SMBfindnclose", NULL,reply_findnclose,AS_USER},
/* 0x36 */ { NULL, NULL, NULL, 0 },
/* 0x37 */ { NULL, NULL, NULL, 0 },
/* 0x38 */ { NULL, NULL, NULL, 0 },
Modified: branches/SAMBA_3_2/source/smbd/trans2.c
===================================================================
--- branches/SAMBA_3_2/source/smbd/trans2.c 2007-08-14 21:32:52 UTC (rev 24443)
+++ branches/SAMBA_3_2/source/smbd/trans2.c 2007-08-14 21:53:48 UTC (rev 24444)
@@ -6816,37 +6816,49 @@
Reply to a SMBfindclose (stop trans2 directory search).
****************************************************************************/
-int reply_findclose(connection_struct *conn,
- char *inbuf,char *outbuf,int length,int bufsize)
+void reply_findclose(connection_struct *conn, struct smb_request *req)
{
- int outsize = 0;
- int dptr_num=SVALS(inbuf,smb_vwv0);
+ int dptr_num;
+
START_PROFILE(SMBfindclose);
+ if (req->wct < 1) {
+ reply_nterror(req, NT_STATUS_INVALID_PARAMETER);
+ END_PROFILE(SMBfindclose);
+ return;
+ }
+
+ dptr_num = SVALS(req->inbuf,smb_vwv0);
+
DEBUG(3,("reply_findclose, dptr_num = %d\n", dptr_num));
dptr_close(&dptr_num);
- outsize = set_message(inbuf, outbuf,0,0,False);
+ reply_outbuf(req, 0, 0);
DEBUG(3,("SMBfindclose dptr_num = %d\n", dptr_num));
END_PROFILE(SMBfindclose);
- return(outsize);
+ return;
}
/****************************************************************************
Reply to a SMBfindnclose (stop FINDNOTIFYFIRST directory search).
****************************************************************************/
-int reply_findnclose(connection_struct *conn,
- char *inbuf,char *outbuf,int length,int bufsize)
+void reply_findnclose(connection_struct *conn, struct smb_request *req)
{
- int outsize = 0;
- int dptr_num= -1;
+ int dptr_num;
+
START_PROFILE(SMBfindnclose);
+
+ if (req->wct < 1) {
+ reply_nterror(req, NT_STATUS_INVALID_PARAMETER);
+ END_PROFILE(SMBfindnclose);
+ return;
+ }
- dptr_num = SVAL(inbuf,smb_vwv0);
+ dptr_num = SVAL(req->inbuf,smb_vwv0);
DEBUG(3,("reply_findnclose, dptr_num = %d\n", dptr_num));
@@ -6854,12 +6866,12 @@
findnotifyfirst - so any dptr_num is ok here.
Just ignore it. */
- outsize = set_message(inbuf, outbuf,0,0,False);
+ reply_outbuf(req, 0, 0);
DEBUG(3,("SMB_findnclose dptr_num = %d\n", dptr_num));
END_PROFILE(SMBfindnclose);
- return(outsize);
+ return;
}
static void handle_trans2(connection_struct *conn, struct smb_request *req,
More information about the samba-cvs
mailing list