summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/process.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index 8ab2897c7a..f6a199e2d6 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -2401,10 +2401,10 @@ static void release_ip(const char *ip, void *priv)
static void msg_release_ip(struct messaging_context *msg_ctx, void *private_data,
uint32_t msg_type, struct server_id server_id, DATA_BLOB *data)
{
- char addr[INET6_ADDRSTRLEN];
+ struct smbd_server_connection *sconn = talloc_get_type_abort(
+ private_data, struct smbd_server_connection);
- client_socket_addr(smbd_server_fd(),addr,sizeof(addr));
- release_ip((char *)data->data, addr);
+ release_ip((char *)data->data, sconn->client_id.addr);
}
#ifdef CLUSTER_SUPPORT
@@ -3058,7 +3058,7 @@ void smbd_process(struct smbd_server_connection *sconn)
/* register our message handlers */
messaging_register(sconn->msg_ctx, NULL,
MSG_SMB_FORCE_TDIS, msg_force_tdis);
- messaging_register(sconn->msg_ctx, NULL,
+ messaging_register(sconn->msg_ctx, sconn,
MSG_SMB_RELEASE_IP, msg_release_ip);
messaging_register(sconn->msg_ctx, NULL,
MSG_SMB_CLOSE_FILE, msg_close_file);