From 984872731a235cf4c37c18b09a4e70795a76da93 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 24 Jul 2018 17:13:39 +0200 Subject: [PATCH] smbd: only pass struct smbXsrv_client to smbXsrv_session_logoff_all() That's all it needs. Signed-off-by: Stefan Metzmacher Reviewed-by: Ralph Boehme --- source3/smbd/globals.h | 2 +- source3/smbd/server_exit.c | 4 ++-- source3/smbd/smbXsrv_session.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/source3/smbd/globals.h b/source3/smbd/globals.h index a6213718b6b..77e8f5c0dd6 100644 --- a/source3/smbd/globals.h +++ b/source3/smbd/globals.h @@ -586,7 +586,7 @@ struct tevent_req *smb2srv_session_shutdown_send(TALLOC_CTX *mem_ctx, struct smbd_smb2_request *current_req); NTSTATUS smb2srv_session_shutdown_recv(struct tevent_req *req); NTSTATUS smbXsrv_session_logoff(struct smbXsrv_session *session); -NTSTATUS smbXsrv_session_logoff_all(struct smbXsrv_connection *conn); +NTSTATUS smbXsrv_session_logoff_all(struct smbXsrv_client *client); NTSTATUS smb1srv_session_table_init(struct smbXsrv_connection *conn); NTSTATUS smb1srv_session_lookup(struct smbXsrv_connection *conn, uint16_t vuid, NTTIME now, diff --git a/source3/smbd/server_exit.c b/source3/smbd/server_exit.c index 00d9fefed9a..652bf6a1776 100644 --- a/source3/smbd/server_exit.c +++ b/source3/smbd/server_exit.c @@ -137,7 +137,7 @@ static void exit_server_common(enum server_exit_reason how, change_to_root_user(); - if (xconn != NULL) { + if (client != NULL) { NTSTATUS status; /* @@ -153,7 +153,7 @@ static void exit_server_common(enum server_exit_reason how, "triggering cleanup\n", nt_errstr(status))); } - status = smbXsrv_session_logoff_all(xconn); + status = smbXsrv_session_logoff_all(client); if (!NT_STATUS_IS_OK(status)) { DEBUG(0,("Server exit (%s)\n", (reason ? reason : "normal exit"))); diff --git a/source3/smbd/smbXsrv_session.c b/source3/smbd/smbXsrv_session.c index 3d8f0be06ef..cf537e7dc9d 100644 --- a/source3/smbd/smbXsrv_session.c +++ b/source3/smbd/smbXsrv_session.c @@ -1756,9 +1756,9 @@ struct smbXsrv_session_logoff_all_state { static int smbXsrv_session_logoff_all_callback(struct db_record *local_rec, void *private_data); -NTSTATUS smbXsrv_session_logoff_all(struct smbXsrv_connection *conn) +NTSTATUS smbXsrv_session_logoff_all(struct smbXsrv_client *client) { - struct smbXsrv_session_table *table = conn->client->session_table; + struct smbXsrv_session_table *table = client->session_table; struct smbXsrv_session_logoff_all_state state; NTSTATUS status; int count = 0; -- 2.11.4.GIT