summaryrefslogtreecommitdiff
path: root/source3/smbd/process.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-09-27 02:15:18 +0200
committerVolker Lendecke <vl@samba.org>2010-09-28 07:36:15 +0200
commitf83e7d8f8c91a1670dfd9f8322c3cf83c95c2b18 (patch)
treea39641597846fa5ce5d9d54a3cbc90850e2fed48 /source3/smbd/process.c
parent93adf70d1a2a3371562606dbda36016e9a15eeaf (diff)
downloadsamba-f83e7d8f8c91a1670dfd9f8322c3cf83c95c2b18.tar.gz
samba-f83e7d8f8c91a1670dfd9f8322c3cf83c95c2b18.tar.bz2
samba-f83e7d8f8c91a1670dfd9f8322c3cf83c95c2b18.zip
s3: Remove "server_fd" global variable
Diffstat (limited to 'source3/smbd/process.c')
-rw-r--r--source3/smbd/process.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index 1ce4ca7263..9535d819dd 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -2410,19 +2410,16 @@ static void msg_release_ip(struct messaging_context *msg_ctx, void *private_data
}
#ifdef CLUSTER_SUPPORT
-static int client_get_tcp_info(struct sockaddr_storage *server,
+static int client_get_tcp_info(int sock, struct sockaddr_storage *server,
struct sockaddr_storage *client)
{
socklen_t length;
- if (server_fd == -1) {
- return -1;
- }
length = sizeof(*server);
- if (getsockname(server_fd, (struct sockaddr *)server, &length) != 0) {
+ if (getsockname(sock, (struct sockaddr *)server, &length) != 0) {
return -1;
}
length = sizeof(*client);
- if (getpeername(server_fd, (struct sockaddr *)client, &length) != 0) {
+ if (getpeername(sock, (struct sockaddr *)client, &length) != 0) {
return -1;
}
return 0;
@@ -3116,7 +3113,7 @@ void smbd_process(struct smbd_server_connection *sconn)
struct sockaddr_storage srv, clnt;
- if (client_get_tcp_info(&srv, &clnt) == 0) {
+ if (client_get_tcp_info(sconn->sock, &srv, &clnt) == 0) {
NTSTATUS status;
status = smbd_register_ips(sconn, &srv, &clnt);
if (!NT_STATUS_IS_OK(status)) {