r1293 - trunk/code/qcommon

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Sat Apr 5 11:10:57 EDT 2008


Author: thilo
Date: 2008-04-05 11:10:50 -0400 (Sat, 05 Apr 2008)
New Revision: 1293

Modified:
   trunk/code/qcommon/net_ip.c
Log:
I hope this makes the code work on solaris, too and fix the EINVAL on sendto()


Modified: trunk/code/qcommon/net_ip.c
===================================================================
--- trunk/code/qcommon/net_ip.c	2008-04-05 14:28:57 UTC (rev 1292)
+++ trunk/code/qcommon/net_ip.c	2008-04-05 15:10:50 UTC (rev 1293)
@@ -550,9 +550,9 @@
 	}
 	else {
 		if(addr.ss_family == AF_INET)
-			ret = sendto( ip_socket, data, length, 0, (struct sockaddr *) &addr, sizeof(addr) );
-		else
-			ret = sendto( ip6_socket, data, length, 0, (struct sockaddr *) &addr, sizeof(addr) );
+			ret = sendto( ip_socket, data, length, 0, (struct sockaddr *) &addr, sizeof(struct sockaddr_in) );
+		else if(addr.ss_family == AF_INET6)
+			ret = sendto( ip6_socket, data, length, 0, (struct sockaddr *) &addr, sizeof(struct sockaddr_in6) );
 	}
 	if( ret == SOCKET_ERROR ) {
 		int err = socketError;




More information about the quake3-commits mailing list