summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-08-28 12:41:27 +0200
committerVolker Lendecke <vl@samba.org>2010-08-28 15:05:27 +0200
commit0a8d49575c77e3ef84d6fa6d346035a2dfbc8039 (patch)
treed7228d08b63ecb88949e5d0dbc7c2ca20455e6d2 /source3
parent15d0d9bcfbc1489725082a4e860f9d403a874d4d (diff)
downloadsamba-0a8d49575c77e3ef84d6fa6d346035a2dfbc8039.tar.gz
samba-0a8d49575c77e3ef84d6fa6d346035a2dfbc8039.tar.bz2
samba-0a8d49575c77e3ef84d6fa6d346035a2dfbc8039.zip
s3: Remove some references to smbd_server_fd()
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/server.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index 3797ae93da..7d257692e9 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -388,15 +388,17 @@ static void smbd_accept_connection(struct tevent_context *ev,
struct smbd_open_socket);
struct sockaddr_storage addr;
socklen_t in_addrlen = sizeof(addr);
+ int fd;
pid_t pid = 0;
uint64_t unique_id;
- smbd_set_server_fd(accept(s->fd, (struct sockaddr *)(void *)&addr,&in_addrlen));
+ fd = accept(s->fd, (struct sockaddr *)(void *)&addr,&in_addrlen);
+ smbd_set_server_fd(fd);
- if (smbd_server_fd() == -1 && errno == EINTR)
+ if (fd == -1 && errno == EINTR)
return;
- if (smbd_server_fd() == -1) {
+ if (fd == -1) {
DEBUG(0,("open_sockets_smbd: accept: %s\n",
strerror(errno)));
return;
@@ -409,7 +411,7 @@ static void smbd_accept_connection(struct tevent_context *ev,
}
if (!allowable_number_of_smbd_processes()) {
- close(smbd_server_fd());
+ close(fd);
smbd_set_server_fd(-1);
return;
}
@@ -482,7 +484,7 @@ static void smbd_accept_connection(struct tevent_context *ev,
}
/* The parent doesn't need this socket */
- close(smbd_server_fd());
+ close(fd);
/* Sun May 6 18:56:14 2001 ackley@cs.unm.edu:
Clear the closed fd info out of server_fd --