Skip to content

Commit

Permalink
git-daemon not listening when compiled with -DNO_IPV6
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Paul Serice authored and Junio C Hamano committed Nov 21, 2005
1 parent ef07618 commit f35230f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions daemon.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f35230f

Please sign in to comment.