summaryrefslogtreecommitdiff
path: root/daemon.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <junkio@cox.net>2005-09-11 18:58:53 -0700
committerLibravatar Junio C Hamano <junkio@cox.net>2005-09-11 18:58:53 -0700
commitc52b60a2f224e42cb3f6724236bcf6d423128ba6 (patch)
tree5aebd90d9bc5867efedf1d62d7d63efe8495b6f8 /daemon.c
parentPrepare 0.99.7 release candidate branch. (diff)
parentUse int instead of socklen_t (diff)
downloadtgif-c52b60a2f224e42cb3f6724236bcf6d423128ba6.tar.xz
Merge branch 'master' of .
Diffstat (limited to 'daemon.c')
-rw-r--r--daemon.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/daemon.c b/daemon.c
index 24bac16668..5100cf2f44 100644
--- a/daemon.c
+++ b/daemon.c
@@ -80,11 +80,11 @@ static unsigned int children_deleted = 0;
static struct child {
pid_t pid;
- socklen_t addrlen;
+ int addrlen;
struct sockaddr_storage address;
} live_child[MAX_CHILDREN];
-static void add_child(int idx, pid_t pid, struct sockaddr *addr, socklen_t addrlen)
+static void add_child(int idx, pid_t pid, struct sockaddr *addr, int addrlen)
{
live_child[idx].pid = pid;
live_child[idx].addrlen = addrlen;
@@ -178,7 +178,7 @@ static void check_max_connections(void)
}
}
-static void handle(int incoming, struct sockaddr *addr, socklen_t addrlen)
+static void handle(int incoming, struct sockaddr *addr, int addrlen)
{
pid_t pid = fork();
@@ -308,7 +308,7 @@ static int serve(int port)
if (FD_ISSET(sockfd, &fds)) {
struct sockaddr_storage ss;
- socklen_t sslen = sizeof(ss);
+ int sslen = sizeof(ss);
int incoming = accept(sockfd, (struct sockaddr *)&ss, &sslen);
if (incoming < 0) {
switch (errno) {