summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/smbd/globals.c1
-rw-r--r--source3/smbd/globals.h1
-rw-r--r--source3/smbd/smb2_server.c2
3 files changed, 3 insertions, 1 deletions
diff --git a/source3/smbd/globals.c b/source3/smbd/globals.c
index 043b1da660..aa17f69c87 100644
--- a/source3/smbd/globals.c
+++ b/source3/smbd/globals.c
@@ -174,6 +174,7 @@ void smbd_init_globals(void)
exit_server("failed to create smbd_server_connection");
}
+ smbd_server_conn->ev_ctx = server_event_context();
smbd_server_conn->smb1.echo_handler.trusted_fd = -1;
smbd_server_conn->smb1.echo_handler.socket_lock_fd = -1;
}
diff --git a/source3/smbd/globals.h b/source3/smbd/globals.h
index a02988a47d..7b7389ae5b 100644
--- a/source3/smbd/globals.h
+++ b/source3/smbd/globals.h
@@ -451,6 +451,7 @@ struct smbd_server_connection {
const struct tsocket_address *local_address;
const struct tsocket_address *remote_address;
const char *remote_hostname;
+ struct tevent_context *ev_ctx;
struct messaging_context *msg_ctx;
struct {
bool got_session;
diff --git a/source3/smbd/smb2_server.c b/source3/smbd/smb2_server.c
index 851e2fd7ef..d4147a1f0f 100644
--- a/source3/smbd/smb2_server.c
+++ b/source3/smbd/smb2_server.c
@@ -98,7 +98,7 @@ static NTSTATUS smbd_initialize_smb2(struct smbd_server_connection *sconn)
TALLOC_FREE(sconn->smb1.fde);
- sconn->smb2.event_ctx = server_event_context();
+ sconn->smb2.event_ctx = sconn->ev_ctx;
sconn->smb2.recv_queue = tevent_queue_create(sconn, "smb2 recv queue");
if (sconn->smb2.recv_queue == NULL) {