summaryrefslogtreecommitdiff
path: root/qpid/cpp/src
diff options
context:
space:
mode:
Diffstat (limited to 'qpid/cpp/src')
-rw-r--r--qpid/cpp/src/qpid/sys/posix/SocketAddress.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/qpid/cpp/src/qpid/sys/posix/SocketAddress.cpp b/qpid/cpp/src/qpid/sys/posix/SocketAddress.cpp
index b88b3a2806..e22d23d675 100644
--- a/qpid/cpp/src/qpid/sys/posix/SocketAddress.cpp
+++ b/qpid/cpp/src/qpid/sys/posix/SocketAddress.cpp
@@ -120,14 +120,14 @@ const ::addrinfo& getAddrInfo(const SocketAddress& sa)
if (!sa.addrInfo) {
::addrinfo hints;
::memset(&hints, 0, sizeof(hints));
- hints.ai_flags = AI_ADDRCONFIG; // Only use protocols that we have configured interfaces for
hints.ai_family = AF_UNSPEC; // Allow both IPv4 and IPv6
hints.ai_socktype = SOCK_STREAM;
const char* node = 0;
if (sa.host.empty()) {
- hints.ai_flags |= AI_PASSIVE;
+ hints.ai_flags = AI_PASSIVE;
} else {
+ hints.ai_flags = AI_ADDRCONFIG; // Only use protocols that we have configured interfaces for
node = sa.host.c_str();
}
const char* service = sa.port.empty() ? "0" : sa.port.c_str();