You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by bo...@apache.org on 2009/05/26 21:59:26 UTC
svn commit: r778863 - in /xerces/c/trunk/src/xercesc/util/NetAccessors:
Socket/UnixHTTPURLInputStream.cpp WinSock/BinHTTPURLInputStream.cpp
Author: borisk
Date: Tue May 26 19:59:25 2009
New Revision: 778863
URL: http://svn.apache.org/viewvc?rev=778863&view=rev
Log:
Check return value of getaddrinfo for non-zero instead of less-than-zero (XERCESC-1871).
Modified:
xerces/c/trunk/src/xercesc/util/NetAccessors/Socket/UnixHTTPURLInputStream.cpp
xerces/c/trunk/src/xercesc/util/NetAccessors/WinSock/BinHTTPURLInputStream.cpp
Modified: xerces/c/trunk/src/xercesc/util/NetAccessors/Socket/UnixHTTPURLInputStream.cpp
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/util/NetAccessors/Socket/UnixHTTPURLInputStream.cpp?rev=778863&r1=778862&r2=778863&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/util/NetAccessors/Socket/UnixHTTPURLInputStream.cpp (original)
+++ xerces/c/trunk/src/xercesc/util/NetAccessors/Socket/UnixHTTPURLInputStream.cpp Tue May 26 19:59:25 2009
@@ -126,11 +126,11 @@
hints.ai_family = PF_UNSPEC;
hints.ai_socktype = SOCK_STREAM;
int n = getaddrinfo(hostNameAsCharStar,portBuffer.getRawBuffer(),&hints, &res);
- if(n<0)
+ if(n != 0)
{
hints.ai_flags = AI_NUMERICHOST;
n = getaddrinfo(hostNameAsCharStar,portBuffer.getRawBuffer(),&hints, &res);
- if(n<0)
+ if(n != 0)
ThrowXMLwithMemMgr1(NetAccessorException, XMLExcepts::NetAcc_TargetResolution, hostName, memoryManager);
}
janSock.reset();
Modified: xerces/c/trunk/src/xercesc/util/NetAccessors/WinSock/BinHTTPURLInputStream.cpp
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/util/NetAccessors/WinSock/BinHTTPURLInputStream.cpp?rev=778863&r1=778862&r2=778863&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/util/NetAccessors/WinSock/BinHTTPURLInputStream.cpp (original)
+++ xerces/c/trunk/src/xercesc/util/NetAccessors/WinSock/BinHTTPURLInputStream.cpp Tue May 26 19:59:25 2009
@@ -334,11 +334,11 @@
hints.ai_family = PF_UNSPEC;
hints.ai_socktype = SOCK_STREAM;
int n = wrap_getaddrinfo(hostNameAsCharStar,portBuffer.getRawBuffer(),&hints, &res);
- if(n<0)
+ if(n != 0)
{
hints.ai_flags = AI_NUMERICHOST;
n = wrap_getaddrinfo(hostNameAsCharStar,(const char*)tempbuf,&hints, &res);
- if(n<0)
+ if(n != 0)
ThrowXMLwithMemMgr1(NetAccessorException, XMLExcepts::NetAcc_TargetResolution, hostName, memoryManager);
}
janSock.reset();
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org