1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00

s3: smbd: Remove old synchronous SMB1 reply_exit().

SMB1 exit is now fully async.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14301

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
Jeremy Allison 2020-03-12 11:01:05 -07:00
parent 8f58feab58
commit 1de0daa715

View File

@ -5766,21 +5766,33 @@ void reply_flush(struct smb_request *req)
conn POINTER CAN BE NULL HERE ! conn POINTER CAN BE NULL HERE !
****************************************************************************/ ****************************************************************************/
void reply_exit(struct smb_request *req) static struct tevent_req *reply_exit_send(struct smb_request *smb1req);
static void reply_exit_done(struct tevent_req *req);
void reply_exit(struct smb_request *smb1req)
{ {
START_PROFILE(SMBexit); struct tevent_req *req;
file_close_pid(req->sconn, req->smbpid, req->vuid); /*
* Don't setup the profile charge here, take
* it in reply_exit_done(). Not strictly correct
* but better than the other SMB1 async
* code that double-charges at the moment.
*/
req = reply_exit_send(smb1req);
if (req == NULL) {
/* Not going async, profile here. */
START_PROFILE(SMBexit);
reply_force_doserror(smb1req, ERRDOS, ERRnomem);
END_PROFILE(SMBexit);
return;
}
reply_outbuf(req, 0, 0); /* We're async. This will complete later. */
tevent_req_set_callback(req, reply_exit_done, smb1req);
DEBUG(3,("exit\n"));
END_PROFILE(SMBexit);
return; return;
} }
#if 0
struct reply_exit_state { struct reply_exit_state {
struct tevent_queue *wait_queue; struct tevent_queue *wait_queue;
}; };
@ -5979,7 +5991,6 @@ static void reply_exit_done(struct tevent_req *req)
END_PROFILE(SMBexit); END_PROFILE(SMBexit);
return; return;
} }
#endif
struct reply_close_state { struct reply_close_state {
files_struct *fsp; files_struct *fsp;