cpp: Disable IPV6_V6ONLY only if the socket is an AF_INET6 socket
authorDavid Reiss <dreiss@apache.org>
Tue, 9 Mar 2010 05:20:10 +0000 (05:20 +0000)
committerDavid Reiss <dreiss@apache.org>
Tue, 9 Mar 2010 05:20:10 +0000 (05:20 +0000)
commiteee98bede4e9934a0cdd32fcffcd0cc659b4d09a
tree8198a0dbfc88c65db98fddf9a8a8872307435290
parentac110e4f1cd87ce38fce06e61ef88bc84ac2edb0
cpp: Disable IPV6_V6ONLY only if the socket is an AF_INET6 socket

Some systems may disable IPV6 completely.  Ensure that we only disable
IPV6_V6ONLY if the socket is AF_INET6

No longer see the warning:

Thrift: Wed Jul 22 18:08:36 2009 TServerSocket::listen() IPV6_V6ONLY Protocol not available

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@920683 13f79535-47bb-0310-9956-ffa450edef68
lib/cpp/src/server/TNonblockingServer.cpp
lib/cpp/src/transport/TServerSocket.cpp