summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d1ab157)
raw | patch | inline | side by side (parent: d1ab157)
author | Paul Serice <paul@serice.net> | |
Tue, 22 Nov 2005 13:54:23 +0000 (07:54 -0600) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Tue, 22 Nov 2005 20:38:27 +0000 (12:38 -0800) |
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>
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>
connect.c | patch | blob | history |
diff --git a/connect.c b/connect.c
index 7a417e5a73f3228af00d2e143b16e24004083341..93f6f80d3e8c5f1592353b6feadb9de2c768b649 100644 (file)
--- a/connect.c
+++ b/connect.c
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);