Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
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