Date: Tuesday, November 28, 2006 @ 17:36:52
Author: gilles
Path: /cvsroot/carob/carob/src
Modified: ControllerInfo.cpp (1.1 -> 1.2)
Use of AI_NUMERICSERV only if defined
--------------------+
ControllerInfo.cpp | 3 +++
1 files changed, 3 insertions(+)
Index: carob/src/ControllerInfo.cpp
diff -u carob/src/ControllerInfo.cpp:1.1 carob/src/ControllerInfo.cpp:1.2
--- carob/src/ControllerInfo.cpp:1.1 Tue Nov 28 17:07:55 2006
+++ carob/src/ControllerInfo.cpp Tue Nov 28 17:36:52 2006
@@ -144,7 +144,10 @@
hint.ai_socktype = SOCK_DGRAM;
hint.ai_family = family;
hint.ai_flags = AI_ADDRCONFIG; // will prevent receiving addresses we can't
talk to
+ #ifdef AI_NUMERICSERV
+ // prevent name resolution (only if AI_NUMERICSERV is supported)
hint.ai_flags |= AI_NUMERICSERV; // service is a port number
+ #endif
// convert given port to char*
snprintf(service, NI_MAXSERV, "%d", port);
int error = getaddrinfo(toString(name).c_str(), service, &hint,
&addressList);
_______________________________________________
Carob-commits mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/carob-commits