s3:smb2_server: use req->xconn->client->raw_ev_ctx for smbd_smb2_request_pending_timer()
authorStefan Metzmacher <metze@samba.org>
Thu, 22 Mar 2018 09:54:41 +0000 (10:54 +0100)
committerStefan Metzmacher <metze@samba.org>
Mon, 18 Jun 2018 06:59:19 +0000 (08:59 +0200)
There's no need to use req->ev_ctx here just to do some network io.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/smbd/smb2_server.c

index b65172253b457c2cbdc7fc5f731df37e8759d95c..ccbea87bfd0dc74d0a599e8eaa6141b37ec875f0 100644 (file)
@@ -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);