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;
}
_______________________________________________
Carob-commits mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/carob-commits