From 16da0e0c511c0c1cf4ea592640c522754065200a Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Tue, 11 May 2010 14:39:58 +0000 Subject: Support for multiple protocols in qpid::Url. - simplified qpid::Address to hold (protocol,host,port) triples. - protocol plugins call Url:addProtocol to add tags to Url parser. - use Address::protocol when establishing connections. - ssl_test: tests using URL to connect. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@943130 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/sys/solaris/SystemInfo.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'cpp/src/qpid/sys/solaris/SystemInfo.cpp') diff --git a/cpp/src/qpid/sys/solaris/SystemInfo.cpp b/cpp/src/qpid/sys/solaris/SystemInfo.cpp index 0075a89021..765e5a7eb0 100755 --- a/cpp/src/qpid/sys/solaris/SystemInfo.cpp +++ b/cpp/src/qpid/sys/solaris/SystemInfo.cpp @@ -49,7 +49,7 @@ long SystemInfo::concurrency() { return sysconf(_SC_NPROCESSORS_ONLN); } -bool SystemInfo::getLocalHostname(TcpAddress &address) { +bool SystemInfo::getLocalHostname(Address &address) { char name[MAXHOSTNAMELEN]; if (::gethostname(name, sizeof(name)) != 0) return false; @@ -58,6 +58,7 @@ bool SystemInfo::getLocalHostname(TcpAddress &address) { } static const string LOCALHOST("127.0.0.1"); +static const string TCP("tcp"); void SystemInfo::getLocalIpAddresses(uint16_t port, std::vector
&addrList) { @@ -71,10 +72,10 @@ void SystemInfo::getLocalIpAddresses(uint16_t port, struct sockaddr_in *sin = (struct sockaddr_in *) &ifr.lifr_addr; std::string addr(inet_ntoa(sin->sin_addr)); if (addr != LOCALHOST) - addrList.push_back(TcpAddress(addr, port)); + addrList.push_back(Address(TCP, addr, port)); } if (addrList.empty()) { - addrList.push_back(TcpAddress(LOCALHOST, port)); + addrList.push_back(Address(TCP, LOCALHOST, port)); } close (s); } -- cgit v1.2.1