{"thread":{"id":"2638","subject":"[PATCH] git-daemon not listening when compiled with -DNO_IPV6","startedAt":"2005-11-21T17:07:23Z","lastAt":"2005-11-21T17:07:23Z","messageCount":1,"participants":["Paul Serice"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"12449","messageId":"20051121170723.BDFAF58220@serice.org","threadId":"2638","inReplyTo":null,"subject":"[PATCH] git-daemon not listening when compiled with -DNO_IPV6","fromName":"Paul Serice","fromEmail":"paul@serice.net","sentAt":"2005-11-21T17:07:23Z","receivedAt":"2005-11-21T17:07:23Z","isPatch":true,"sender":{"key":"paul@serice.net","avatar":null},"body":"git-daemon was not listening when compiled with -DNO_IPV6.\nsocksetup() was not returning socket count when compiled with -DNO_IPV6.\n\nSigned-off-by: Paul Serice <paul@serice.net>\n\n\n---\n\n daemon.c |    6 ++++++\n 1 files changed, 6 insertions(+), 0 deletions(-)\n\napplies-to: 339319e60db7b3f96f8c711407b135a54da7aa2e\nbb8968537a35a635c6f8a6393cff8735b4edcef9\ndiff --git a/daemon.c b/daemon.c\nindex 2b81152..e889596 100644\n--- a/daemon.c\n+++ b/daemon.c\n@@ -510,8 +510,14 @@ static int socksetup(int port, int **soc\n \t\treturn 0;\n \t}\n \n+\tif (listen(sockfd, 5) < 0) {\n+\t\tclose(sockfd);\n+\t\treturn 0;\n+\t}\n+\n \t*socklist_p = xmalloc(sizeof(int));\n \t**socklist_p = sockfd;\n+\treturn 1;\n }\n \n #endif\n---\n0.99.9i\n"}]}