qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From astitc...@apache.org
Subject svn commit: r1494712 - /qpid/trunk/qpid/cpp/src/qpid/sys/windows/SocketAddress.cpp
Date Wed, 19 Jun 2013 17:59:53 GMT
Author: astitcher
Date: Wed Jun 19 17:59:52 2013
New Revision: 1494712

URL: http://svn.apache.org/r1494712
Log:
QPID-4931: Remove removed member function from windows SocketAddress
code too. While there bring this code up to date with other recent
changes to the POSIX equivalent code.

Modified:
    qpid/trunk/qpid/cpp/src/qpid/sys/windows/SocketAddress.cpp

Modified: qpid/trunk/qpid/cpp/src/qpid/sys/windows/SocketAddress.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/sys/windows/SocketAddress.cpp?rev=1494712&r1=1494711&r2=1494712&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/sys/windows/SocketAddress.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/sys/windows/SocketAddress.cpp Wed Jun 19 17:59:52 2013
@@ -39,14 +39,16 @@ namespace sys {
 SocketAddress::SocketAddress(const std::string& host0, const std::string& port0)
:
     host(host0),
     port(port0),
-    addrInfo(0)
+    addrInfo(0),
+    currentAddrInfo(0)
 {
 }
 
 SocketAddress::SocketAddress(const SocketAddress& sa) :
     host(sa.host),
     port(sa.port),
-    addrInfo(0)
+    addrInfo(0),
+    currentAddrInfo(0)
 {
 }
 
@@ -104,6 +106,11 @@ std::string SocketAddress::asString(bool
     return asString(ai.ai_addr, ai.ai_addrlen);
 }
 
+std::string SocketAddress::getHost() const
+{
+    return host;
+}
+
 bool SocketAddress::nextAddress() {
     bool r = currentAddrInfo->ai_next != 0;
     if (r)
@@ -111,17 +118,6 @@ bool SocketAddress::nextAddress() {
     return r;
 }
 
-void SocketAddress::setAddrInfoPort(uint16_t port) {
-    if (!currentAddrInfo) return;
-
-    ::addrinfo& ai = *currentAddrInfo;
-    switch (ai.ai_family) {
-    case AF_INET: ((::sockaddr_in*)ai.ai_addr)->sin_port = htons(port); return;
-    case AF_INET6:((::sockaddr_in6*)ai.ai_addr)->sin6_port = htons(port); return;
-    default: throw Exception(QPID_MSG("Unexpected socket type"));
-    }
-}
-
 const ::addrinfo& getAddrInfo(const SocketAddress& sa)
 {
     if (!sa.addrInfo) {



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message