From f5754d36a70fb9c76be5d82a29bbd396023594d5 Mon Sep 17 00:00:00 2001 From: Jeremy Geras Date: Thu, 9 May 2013 21:21:48 +0000 Subject: [PATCH] name change for connect(..) param in reTurn; is_v6 -> allowV6 git-svn-id: https://svn.resiprocate.org/rep/resiprocate/branches/b-counterpath-recon-20130424@10204 ddefafc4-47db-0310-ae44-fa13212b10f2 --- reTurn/AsyncSocketBase.hxx | 2 +- reTurn/AsyncTcpSocketBase.cxx | 2 +- reTurn/AsyncTcpSocketBase.hxx | 2 +- reTurn/AsyncTlsSocketBase.cxx | 2 +- reTurn/AsyncTlsSocketBase.hxx | 2 +- reTurn/AsyncUdpSocketBase.cxx | 4 ++-- reTurn/AsyncUdpSocketBase.hxx | 2 +- reTurn/client/TurnAsyncSocket.cxx | 4 ++-- reTurn/client/TurnAsyncSocket.hxx | 2 +- reTurn/client/test/TestAsyncClient.cxx | 2 +- reTurn/client/test/TestRtpLoad.cxx | 2 +- 11 files changed, 13 insertions(+), 13 deletions(-) diff --git a/reTurn/AsyncSocketBase.hxx b/reTurn/AsyncSocketBase.hxx index c563bf0595..7d4dd11ff1 100644 --- a/reTurn/AsyncSocketBase.hxx +++ b/reTurn/AsyncSocketBase.hxx @@ -30,7 +30,7 @@ public: /// Note: The following API's are thread safe and queue the request to be handled by the ioService thread virtual asio::error_code bind(const asio::ip::address& address, unsigned short port) = 0; - virtual void connect(const std::string& address, unsigned short port, bool is_v6) = 0; + virtual void connect(const std::string& address, unsigned short port, bool allowV6) = 0; /// Note: destination is ignored for TCP and TLS connections virtual void send(const StunTuple& destination, boost::shared_ptr& data); // Send unframed data virtual void send(const StunTuple& destination, unsigned short channel, boost::shared_ptr& data); // send with turn framing diff --git a/reTurn/AsyncTcpSocketBase.cxx b/reTurn/AsyncTcpSocketBase.cxx index 6a4b1e418f..7cc94ade94 100644 --- a/reTurn/AsyncTcpSocketBase.cxx +++ b/reTurn/AsyncTcpSocketBase.cxx @@ -47,7 +47,7 @@ AsyncTcpSocketBase::bind(const asio::ip::address& address, unsigned short port) } void -AsyncTcpSocketBase::connect(const std::string& address, unsigned short port, bool is_v6) +AsyncTcpSocketBase::connect(const std::string& address, unsigned short port, bool allowV6) { // Start an asynchronous resolve to translate the address // into a list of endpoints. diff --git a/reTurn/AsyncTcpSocketBase.hxx b/reTurn/AsyncTcpSocketBase.hxx index 619a3f8c91..02608b7dbe 100644 --- a/reTurn/AsyncTcpSocketBase.hxx +++ b/reTurn/AsyncTcpSocketBase.hxx @@ -17,7 +17,7 @@ public: virtual unsigned int getSocketDescriptor(); virtual asio::error_code bind(const asio::ip::address& address, unsigned short port); - virtual void connect(const std::string& address, unsigned short port, bool is_v6); + virtual void connect(const std::string& address, unsigned short port, bool allowV6); virtual void transportReceive(); virtual void transportFramedReceive(); diff --git a/reTurn/AsyncTlsSocketBase.cxx b/reTurn/AsyncTlsSocketBase.cxx index b7e5bf5e46..93d740fe3c 100644 --- a/reTurn/AsyncTlsSocketBase.cxx +++ b/reTurn/AsyncTlsSocketBase.cxx @@ -54,7 +54,7 @@ AsyncTlsSocketBase::bind(const asio::ip::address& address, unsigned short port) } void -AsyncTlsSocketBase::connect(const std::string& address, unsigned short port, bool is_v6) +AsyncTlsSocketBase::connect(const std::string& address, unsigned short port, bool allowV6) { mHostname = address; diff --git a/reTurn/AsyncTlsSocketBase.hxx b/reTurn/AsyncTlsSocketBase.hxx index 0f0444253f..3e71be7633 100644 --- a/reTurn/AsyncTlsSocketBase.hxx +++ b/reTurn/AsyncTlsSocketBase.hxx @@ -24,7 +24,7 @@ public: virtual unsigned int getSocketDescriptor(); virtual asio::error_code bind(const asio::ip::address& address, unsigned short port); - virtual void connect(const std::string& address, unsigned short port, bool is_v6); + virtual void connect(const std::string& address, unsigned short port, bool allowV6); void doHandshake(); diff --git a/reTurn/AsyncUdpSocketBase.cxx b/reTurn/AsyncUdpSocketBase.cxx index 4fac39572c..135b2245f4 100644 --- a/reTurn/AsyncUdpSocketBase.cxx +++ b/reTurn/AsyncUdpSocketBase.cxx @@ -44,13 +44,13 @@ AsyncUdpSocketBase::bind(const asio::ip::address& address, unsigned short port) } void -AsyncUdpSocketBase::connect(const std::string& address, unsigned short port, bool is_v6) +AsyncUdpSocketBase::connect(const std::string& address, unsigned short port, bool allowV6) { // Start an asynchronous resolve to translate the address // into a list of endpoints. resip::Data service(port); #ifdef USE_IPV6 - asio::ip::udp::resolver::query query((is_v6 ? asio::ip::udp::v6() : asio::ip::udp::v4()), address, service.c_str()); + asio::ip::udp::resolver::query query((allowV6 ? asio::ip::udp::v6() : asio::ip::udp::v4()), address, service.c_str()); #else asio::ip::udp::resolver::query query(asio::ip::udp::v4(), address, service.c_str()); #endif diff --git a/reTurn/AsyncUdpSocketBase.hxx b/reTurn/AsyncUdpSocketBase.hxx index 88f9810fa7..2f094d0126 100644 --- a/reTurn/AsyncUdpSocketBase.hxx +++ b/reTurn/AsyncUdpSocketBase.hxx @@ -17,7 +17,7 @@ public: virtual unsigned int getSocketDescriptor(); virtual asio::error_code bind(const asio::ip::address& address, unsigned short port); - virtual void connect(const std::string& address, unsigned short port, bool is_v6); + virtual void connect(const std::string& address, unsigned short port, bool allowV6); virtual void transportReceive(); virtual void transportFramedReceive(); diff --git a/reTurn/client/TurnAsyncSocket.cxx b/reTurn/client/TurnAsyncSocket.cxx index 0219b91382..b1291b3e2e 100644 --- a/reTurn/client/TurnAsyncSocket.cxx +++ b/reTurn/client/TurnAsyncSocket.cxx @@ -1100,9 +1100,9 @@ TurnAsyncSocket::sendToRemotePeer(RemotePeer& remotePeer, boost::shared_ptrconnect(argv[1], port); + turnSocket->connect(argv[1], port, false); // Set the username and password turnSocket->setUsernameAndPassword(username, password); diff --git a/reTurn/client/test/TestRtpLoad.cxx b/reTurn/client/test/TestRtpLoad.cxx index be46f44397..ad0c4e5413 100644 --- a/reTurn/client/test/TestRtpLoad.cxx +++ b/reTurn/client/test/TestRtpLoad.cxx @@ -368,7 +368,7 @@ int main(int argc, char* argv[]) handler.setTurnAsyncSocket(turnSocket.get()); // Connect to Stun/Turn Server - turnSocket->connect(turnAddress.c_str(), port); + turnSocket->connect(turnAddress.c_str(), port, false); // Set the username and password turnSocket->setUsernameAndPassword(username, password);