diff options
author | Paul Serice <paul@serice.net> | 2005-11-21 20:07:23 +0300 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2005-11-22 01:36:43 +0300 |
commit | f35230fb1123a0db4776c574a874aecec1f38db8 (patch) | |
tree | 7b7ad64914f1d3bd587babf87fa83f6d9277426a | |
parent | ef07618fdd660057b80fe75007405c62502a5820 (diff) |
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>
-rw-r--r-- | daemon.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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 |