[Python-checkins] python/dist/src/Modules getaddrinfo.c,1.11,1.12

rhettinger at users.sourceforge.net rhettinger at users.sourceforge.net
Sun Aug 17 15:28:41 EDT 2003


Update of /cvsroot/python/python/dist/src/Modules
In directory sc8-pr-cvs1:/tmp/cvs-serv21536

Modified Files:
	getaddrinfo.c 
Log Message:
SF #784031:  Byte-order bug in socket-module getaddrinfo.c



Index: getaddrinfo.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/getaddrinfo.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** getaddrinfo.c	17 Jul 2002 14:33:34 -0000	1.11
--- getaddrinfo.c	17 Aug 2003 21:28:39 -0000	1.12
***************
*** 422,425 ****
--- 422,426 ----
  			case AF_INET:
  				v4a = ((struct in_addr *)pton)->s_addr;
+ 				v4a = ntohl(v4a);
  				if (IN_MULTICAST(v4a) || IN_EXPERIMENTAL(v4a))
  					pai->ai_flags &= ~AI_CANONNAME;





More information about the Python-checkins mailing list