From: Paul Serice Date: Mon, 21 Nov 2005 17:07:23 +0000 (-0600) Subject: git-daemon not listening when compiled with -DNO_IPV6 X-Git-Tag: v0.99.9k^2~29 X-Git-Url: https://git.octo.it/?a=commitdiff_plain;h=f35230fb1123a0db4776c574a874aecec1f38db8;p=git.git 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 Signed-off-by: Junio C Hamano --- diff --git a/daemon.c b/daemon.c index d788167a..91b96569 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