1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-24 11:56:10 +02:00

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>
This commit is contained in:
Paul Serice 2005-11-22 07:54:23 -06:00 committed by Junio C Hamano
parent d1ab157759
commit c61642185d

View File

@ -427,7 +427,7 @@ static int git_tcp_connect(int fd[2], const char *prog, char *host, char *path)
memset(&sa, 0, sizeof sa);
sa.sin_family = he->h_addrtype;
sa.sin_port = htons(nport);
memcpy(&sa.sin_addr, ap, he->h_length);
memcpy(&sa.sin_addr, *ap, he->h_length);
if (connect(sockfd, (struct sockaddr *)&sa, sizeof sa) < 0) {
close(sockfd);