From: Stefan Metzmacher Date: Thu, 22 Mar 2018 09:54:41 +0000 (+0100) Subject: s3:smb2_server: use req->xconn->client->raw_ev_ctx for smbd_smb2_request_pending_timer() X-Git-Tag: tevent-0.9.37~286 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=051c32167ce4a8395daa4ff1eb72eb805da9feab;p=thirdparty%2Fsamba.git s3:smb2_server: use req->xconn->client->raw_ev_ctx for smbd_smb2_request_pending_timer() There's no need to use req->ev_ctx here just to do some network io. Signed-off-by: Stefan Metzmacher Reviewed-by: Ralph Boehme --- diff --git a/source3/smbd/smb2_server.c b/source3/smbd/smb2_server.c index b65172253b4..ccbea87bfd0 100644 --- a/source3/smbd/smb2_server.c +++ b/source3/smbd/smb2_server.c @@ -1482,8 +1482,14 @@ NTSTATUS smbd_smb2_request_pending_queue(struct smbd_smb2_request *req, data_blob_clear_free(&req->last_key); } + /* + * smbd_smb2_request_pending_timer() just send a packet + * to the client and doesn't need any impersonation. + * So we use req->xconn->client->raw_ev_ctx instead + * of req->ev_ctx here. + */ defer_endtime = timeval_current_ofs_usec(defer_time); - req->async_te = tevent_add_timer(req->sconn->ev_ctx, + req->async_te = tevent_add_timer(req->xconn->client->raw_ev_ctx, req, defer_endtime, smbd_smb2_request_pending_timer, req);