From d05d8bbddc505a0117010dd05da4d9b89c0c728f Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Wed, 6 May 2009 07:42:59 +0000 Subject: 2009-05-06 Tatsuhiro Tsujikawa Added static member _protocolFamily to SocketCore. By default, SocketCore uses AF_UNSPEC for getaddrinfo hints to resolve address. Sometime SocketCore::bind() and SocketCore::establishConnection() use difference protocl family and latter cannot connect to former. To avoid this situation, we limit protocol family to AF_INET for unit tests. * src/SocketCore.cc * src/SocketCore.h * test/AllTest.cc --- src/SocketCore.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/SocketCore.h') diff --git a/src/SocketCore.h b/src/SocketCore.h index 1c0c553e..aa46dc71 100644 --- a/src/SocketCore.h +++ b/src/SocketCore.h @@ -90,6 +90,8 @@ private: static PollMethod _pollMethod; + static int _protocolFamily; + bool blocking; int secure; @@ -341,6 +343,11 @@ public: #ifdef ENABLE_SSL static void setTLSContext(const SharedHandle& tlsContext); #endif // ENABLE_SSL + + static void setProtocolFamily(int protocolFamily) + { + _protocolFamily = protocolFamily; + } }; } // namespace aria2 -- cgit