Browse Source

Fix _set_ip_addr_port not setting the address.

(cherry picked from commit cdc1ca0f1301bb907121292db83f98706722ff1e)
Fabio Alessandrelli 8 years ago
parent
commit
19b31297ec
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/unix/socket_helpers.h

+ 1 - 1
drivers/unix/socket_helpers.h

@@ -88,7 +88,7 @@ static void _set_ip_addr_port(IP_Address& r_ip, int& r_port, struct sockaddr_sto
 		r_ip.type = IP_Address::TYPE_IPV6;
 		r_ip.type = IP_Address::TYPE_IPV6;
 
 
 		struct sockaddr_in6* addr6 = (struct sockaddr_in6*)p_addr;
 		struct sockaddr_in6* addr6 = (struct sockaddr_in6*)p_addr;
-		copymem(&addr6->sin6_addr.s6_addr, r_ip.field8, 16);
+		copymem(&r_ip.field8, addr6->sin6_addr.s6_addr, 16);
 
 
 		r_port = ntohs(addr6->sin6_port);
 		r_port = ntohs(addr6->sin6_port);
 	};
 	};