Git development
 help / color / mirror / Atom feed
From: Paul Serice <paul@serice.net>
To: git@vger.kernel.org
Subject: [PATCH] git-daemon not listening when compiled with -DNO_IPV6
Date: Mon, 21 Nov 2005 11:07:23 -0600 (CST)	[thread overview]
Message-ID: <20051121170723.BDFAF58220@serice.org> (raw)

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

                 reply	other threads:[~2005-11-21 17:08 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20051121170723.BDFAF58220@serice.org \
    --to=paul@serice.net \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox