Skip to content

Commit f35230f

Browse files
Paul SericeJunio C Hamano
authored andcommitted
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>
1 parent ef07618 commit f35230f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

daemon.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,8 +466,14 @@ static int socksetup(int port, int **socklist_p)
466466
return 0;
467467
}
468468

469+
if (listen(sockfd, 5) < 0) {
470+
close(sockfd);
471+
return 0;
472+
}
473+
469474
*socklist_p = xmalloc(sizeof(int));
470475
**socklist_p = sockfd;
476+
return 1;
471477
}
472478

473479
#endif

0 commit comments

Comments
 (0)