"Medve Emilian" <Emilian.Medve@xxxxxxxxxxxxx> writes: > It seems that something changed since maint/v.1.5.3.6 such that on > master and next git-daemon doesn't seem to be working anymore in inetd > mode. Can somebody please confirm this? Sorry, I cannot quite parse. Do you mean: master and next used to work. Recently 'maint' was merged to them after v1.5.3.6 was cut. master and next does not work anymore after that. Or do you mean: maint (specifically at v1.5.3.6) works, but master and next contain more changes on top of them, and they do not work. In either case, the only change to the daemon code between v1.5.3.5 and master is this one: commit c67359be45be74e1056d6293c6bb09ee6d00a54a Author: Gerrit Pape <pape@xxxxxxxxxxx> Date: Mon Nov 5 09:16:22 2007 +0000 git-daemon: fix remote port number in log entry The port number in struct sockaddr_in needs to be converted from network byte order to host byte order (on some architectures). Signed-off-by: Gerrit Pape <pape@xxxxxxxxxxx> Signed-off-by: Junio C Hamano <gitster@xxxxxxxxx> --- daemon.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/daemon.c b/daemon.c index 660e155..b8df980 100644 --- a/daemon.c +++ b/daemon.c @@ -540,7 +540,7 @@ static int execute(struct sockaddr *addr) if (addr->sa_family == AF_INET) { struct sockaddr_in *sin_addr = (void *) addr; inet_ntop(addr->sa_family, &sin_addr->sin_addr, addrbuf, sizeof(addrbuf)); - port = sin_addr->sin_port; + port = ntohs(sin_addr->sin_port); #ifndef NO_IPV6 } else if (addr && addr->sa_family == AF_INET6) { struct sockaddr_in6 *sin6_addr = (void *) addr; @@ -550,7 +550,7 @@ static int execute(struct sockaddr *addr) inet_ntop(AF_INET6, &sin6_addr->sin6_addr, buf, sizeof(addrbuf) - 1); strcat(buf, "]"); - port = sin6_addr->sin6_port; + port = ntohs(sin6_addr->sin6_port); #endif } loginfo("Connection from %s:%d", addrbuf, port); I do not see anything wrong in it. The "port" variable is very local to this function and is used only for that loginfo() call at the end of the context. So I am quite puzzled. We have another irrelevant style change that is full of things like this, but I do not think that makes any behaviour difference either. @@ -406,7 +406,8 @@ static struct daemon_service daemon_service[] = { { "receive-pack", "receivepack", receive_pack, 0, 1 }, }; -static void enable_service(const char *name, int ena) { +static void enable_service(const char *name, int ena) +{ int i; for (i = 0; i < ARRAY_SIZE(daemon_service); i++) { if (!strcmp(daemon_service[i].name, name)) { - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html