git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] git-daemon not listening when compiled with -DNO_IPV6

From
PSPaul Serice <paul@serice.net>
Date
Nov 21, 2005, 17:07 UTC
Message-ID
<20051121170723.BDFAF58220@serice.org>

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>
---
 daemon.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

applies-to: 339319e60db7b3f96f8c711407b135a54da7aa2e bb8968537a35a635c6f8a6393cff8735b4edcef9

diff --git a/daemon.c b/daemon.c
index 2b81152..e889596 100644
--- a/daemon.c
+++ b/daemon.c
@@ -510,8 +510,14 @@ static int socksetup(int port, int **soc
 		return 0;
 	}
 
+	if (listen(sockfd, 5) < 0) {
+		close(sockfd);
+		return 0;
+	}
+
 	*socklist_p = xmalloc(sizeof(int));
 	**socklist_p = sockfd;
+	return 1;
 }
 
 #endif
---
0.99.9i
Message 1 of 1 in “git-daemon not listening when compiled with -DNO_IPV6”
  1. git-daemon not listening when compiled with -DNO_IPV6Paul Serice, Nov 21, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.