Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

CVS update of carob/src (JavaSocket.cpp): msg#00086

db.carob.cvs

Subject: CVS update of carob/src (JavaSocket.cpp)

Date: Friday, February 24, 2006 @ 12:54:12
Author: gilles
Path: /cvsroot/carob/carob/src

Modified: JavaSocket.cpp (1.41 -> 1.42)

Minor init and logging fixes


----------------+
JavaSocket.cpp | 13 ++++++-------
1 files changed, 6 insertions(+), 7 deletions(-)


Index: carob/src/JavaSocket.cpp
diff -u carob/src/JavaSocket.cpp:1.41 carob/src/JavaSocket.cpp:1.42
--- carob/src/JavaSocket.cpp:1.41 Tue Feb 21 17:10:27 2006
+++ carob/src/JavaSocket.cpp Fri Feb 24 12:54:12 2006
@@ -126,8 +126,8 @@
// connect to, but if we get multiple addresses, we will try to connect
// to all of these (in the order returned by getaddrinfo()

- struct addrinfo *addressInfoList,
- *addressInfoPtr;
+ struct addrinfo *addressInfoList = NULL,
+ *addressInfoPtr = NULL;
sockaddr_in addr = {0};
// try
std::string hostAsString = toString(host);
@@ -141,7 +141,7 @@
throw ConnectionException(L"Host string conversion failed");
}
#endif
-
+
int error = getaddrinfo(hostAsString.c_str(), NULL, NULL, &addressInfoList);

if (error)
@@ -173,16 +173,15 @@
}
else
{
- if (isWarnEnabled())
- logWarn(fctName, L"Could not connect trying next address if any...");
+ if (isDebugEnabled())
+ logDebug(fctName, L"Could not connect trying next address if
any...");
}
addressInfoPtr = addressInfoPtr->ai_next;
}
}
//if we get here, it means we could'nt connect to any of the addresses
found...
- wstring msg(L"Unable to connect. Last error code was "+toWString(errno));
freeaddrinfo(addressInfoList);
- throw ConnectionException(msg);
+ throw ConnectionException(L"Unable to connect. Last error code was
"+toWString(errno));
connected = false;
return false;
}


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation

Home | advertise | OSDir is an inevitable website. super tiny logo