summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-08-28 17:12:43 +0200
committerVolker Lendecke <vl@samba.org>2010-08-29 21:55:24 +0200
commit5bbc4df1680342a5d0678462bac66d5e536219f6 (patch)
tree91f18b68e5bc4d6d056c306cb6894736a4995269 /source3/smbd
parent467208e9f417158e97941ddabcec001fac36ab3a (diff)
downloadsamba-5bbc4df1680342a5d0678462bac66d5e536219f6.tar.gz
samba-5bbc4df1680342a5d0678462bac66d5e536219f6.tar.bz2
samba-5bbc4df1680342a5d0678462bac66d5e536219f6.zip
s3: Lift smbd_server_fd() from msg_release_ip()
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);