@matheusbsbs / matheus-bagliano / commits / c61642185d
Fork 0

Fixed git:// IPv4 address problem when compiled with -DNO_IPV6.

Failure to dereference a pointer caused incorrect initialization of the IPv4 address when calling connect() when compiled with -DNO_IPV6. With this patch and yesterday's patch for git-daemon, it should now be possible to use the native git protocol for both the client and server on Cygwin. Signed-off-by: Paul Serice <paul@serice.net> Signed-off-by: Junio C Hamano <junkio@cox.net>

Paul Serice committed Nov 22, 2005 at 07:54 UTC c61642185d411e5e3350566a68483e358ca392b9
1 file changed +1 -1
connect.c
+1 -1
@@ -427,7 +427,7 @@ static int git_tcp_connect(int fd[2], const char *prog, char *host, char *path)
427 memset(&sa, 0, sizeof sa);
428 sa.sin_family = he->h_addrtype;
429 sa.sin_port = htons(nport);
430 - memcpy(&sa.sin_addr, ap, he->h_length);
430 + memcpy(&sa.sin_addr, *ap, he->h_length);
431
432 if (connect(sockfd, (struct sockaddr *)&sa, sizeof sa) < 0) {
433 close(sockfd);