summaryrefslogtreecommitdiff
path: root/daemon.c
diff options
context:
space:
mode:
authorPaul Serice <paul@serice.net>2005-11-21 11:07:23 -0600
committerJunio C Hamano <junkio@cox.net>2005-11-21 14:36:43 -0800
commitf35230fb1123a0db4776c574a874aecec1f38db8 (patch)
tree7b7ad64914f1d3bd587babf87fa83f6d9277426a /daemon.c
parentef07618fdd660057b80fe75007405c62502a5820 (diff)
downloadgit-f35230fb1123a0db4776c574a874aecec1f38db8.tar.gz
git-daemon not listening when compiled with -DNO_IPV6
git-daemon was not listening when compiled with -DNO_IPV6. socksetup() was not returning socket count when compiled with -DNO_IPV6. Signed-off-by: Paul Serice <paul@serice.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'daemon.c')
-rw-r--r--daemon.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/daemon.c b/daemon.c
index d788167ae0..91b96569cd 100644
--- a/daemon.c
+++ b/daemon.c
@@ -466,8 +466,14 @@ static int socksetup(int port, int **socklist_p)
return 0;
}
+ if (listen(sockfd, 5) < 0) {
+ close(sockfd);
+ return 0;
+ }
+
*socklist_p = xmalloc(sizeof(int));
**socklist_p = sockfd;
+ return 1;
}
#endif