1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

r24444: Convert reply_find[n]close to the new API

This commit is contained in:
Volker Lendecke 2007-08-14 21:53:48 +00:00 committed by Gerald (Jerry) Carter
parent a8a33c377e
commit 6af8595346
2 changed files with 27 additions and 15 deletions

View File

@ -742,8 +742,8 @@ static const struct smb_message_struct {
/* 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 },

View File

@ -6816,37 +6816,49 @@ static void call_trans2ioctl(connection_struct *conn,
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 @@ int reply_findnclose(connection_struct *conn,
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,