smbd: add smbd_server_connection->raw_ev_ctx pointer
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)
This will replace smbd_server_connection->ev_ctx in the next commits.

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

index 492430f9bbecaf6a253eb90147591ffe42426d7d..eebb314dbe55e5f35c6e01574277d2a1a77124a6 100644 (file)
@@ -873,6 +873,7 @@ struct smbd_server_connection {
        const struct tsocket_address *remote_address;
        const char *remote_hostname;
        struct tevent_context *ev_ctx;
+       struct tevent_context *raw_ev_ctx;
        struct messaging_context *msg_ctx;
        struct notify_context *notify_ctx;
        bool using_smb2;
index 59ef628322a386fbc2c6165cd3c8ff85fd978089..53bcedcac964ce3f7dcc01413cd5cc8d1275cd8e 100644 (file)
@@ -257,12 +257,13 @@ static NTSTATUS create_conn_struct_as_root(TALLOC_CTX *ctx,
                return NT_STATUS_NO_MEMORY;
        }
 
-       sconn->ev_ctx = samba_tevent_context_init(sconn);
-       if (sconn->ev_ctx == NULL) {
+       sconn->raw_ev_ctx = samba_tevent_context_init(sconn);
+       if (sconn->raw_ev_ctx == NULL) {
                TALLOC_FREE(sconn);
                return NT_STATUS_NO_MEMORY;
        }
 
+       sconn->ev_ctx = sconn->raw_ev_ctx;
        sconn->msg_ctx = msg;
 
        conn = conn_new(sconn);
index 99693ed1315b98360ca164439b33d061d703b9a2..03aa2254c15685d585fffefff19a4a4f43822d6b 100644 (file)
@@ -3924,6 +3924,7 @@ void smbd_process(struct tevent_context *ev_ctx,
        sconn->client = client;
 
        sconn->ev_ctx = ev_ctx;
+       sconn->raw_ev_ctx = ev_ctx;
        sconn->msg_ctx = msg_ctx;
 
        ret = pthreadpool_tevent_init(sconn, lp_aio_max_threads(),