summaryrefslogtreecommitdiff
path: root/qpid/cpp/src
diff options
context:
space:
mode:
authorAndrew Stitcher <astitcher@apache.org>2013-06-19 17:59:52 +0000
committerAndrew Stitcher <astitcher@apache.org>2013-06-19 17:59:52 +0000
commitb5a380e6c4389054cd73fae07d7d7181f9fa40ec (patch)
treec5fdf153c8b0e3c8d59fad0f7e80bb49a79595f2 /qpid/cpp/src
parent25d4cd64c85b6e04d73f320ba131145fc644e10d (diff)
downloadqpid-python-b5a380e6c4389054cd73fae07d7d7181f9fa40ec.tar.gz
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. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1494712 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src')
-rw-r--r--qpid/cpp/src/qpid/sys/windows/SocketAddress.cpp22
1 files changed, 9 insertions, 13 deletions
diff --git a/qpid/cpp/src/qpid/sys/windows/SocketAddress.cpp b/qpid/cpp/src/qpid/sys/windows/SocketAddress.cpp
index 77bbf85810..b5146678af 100644
--- a/qpid/cpp/src/qpid/sys/windows/SocketAddress.cpp
+++ b/qpid/cpp/src/qpid/sys/windows/SocketAddress.cpp
@@ -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 numeric) const
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) {