summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorAndrew Stitcher <astitcher@apache.org>2012-08-29 17:51:29 +0000
committerAndrew Stitcher <astitcher@apache.org>2012-08-29 17:51:29 +0000
commitea33c76dd2238e2bc960ad752128f883bd1e6e20 (patch)
tree5a9556a3c207c011c7d7acaa44ac7e81e495e0b3 /cpp/src
parente77c42f64df3db3a2a98da5a71e91f33e86b6d72 (diff)
downloadqpid-python-ea33c76dd2238e2bc960ad752128f883bd1e6e20.tar.gz
NO-JIRA: Remove redundant stuff from SslSocket
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1378661 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/qpid/client/SslConnector.cpp2
-rw-r--r--cpp/src/qpid/sys/ssl/SslSocket.cpp33
-rw-r--r--cpp/src/qpid/sys/ssl/SslSocket.h3
3 files changed, 1 insertions, 37 deletions
diff --git a/cpp/src/qpid/client/SslConnector.cpp b/cpp/src/qpid/client/SslConnector.cpp
index 43e8cf6225..0b07d14f35 100644
--- a/cpp/src/qpid/client/SslConnector.cpp
+++ b/cpp/src/qpid/client/SslConnector.cpp
@@ -184,7 +184,7 @@ void SslConnector::connect(const std::string& host, const std::string& port){
boost::bind(&SslConnector::writebuff, this, _1));
aio->createBuffers(maxFrameSize);
- identifier = str(format("[%1% %2%]") % socket.getLocalPort() % socket.getPeerAddress());
+ identifier = str(format("[%1%]") % socket.getFullAddress());
ProtocolInitiation init(version);
writeDataBlock(init);
aio->start(poller);
diff --git a/cpp/src/qpid/sys/ssl/SslSocket.cpp b/cpp/src/qpid/sys/ssl/SslSocket.cpp
index 30234bb686..352415128b 100644
--- a/cpp/src/qpid/sys/ssl/SslSocket.cpp
+++ b/cpp/src/qpid/sys/ssl/SslSocket.cpp
@@ -52,28 +52,6 @@ namespace sys {
namespace ssl {
namespace {
-std::string getService(int fd, bool local)
-{
- ::sockaddr_storage name; // big enough for any socket address
- ::socklen_t namelen = sizeof(name);
-
- int result = -1;
- if (local) {
- result = ::getsockname(fd, (::sockaddr*)&name, &namelen);
- } else {
- result = ::getpeername(fd, (::sockaddr*)&name, &namelen);
- }
-
- QPID_POSIX_CHECK(result);
-
- char servName[NI_MAXSERV];
- if (int rc=::getnameinfo((::sockaddr*)&name, namelen, 0, 0,
- servName, sizeof(servName),
- NI_NUMERICHOST | NI_NUMERICSERV) != 0)
- throw QPID_POSIX_ERROR(rc);
- return servName;
-}
-
const std::string DOMAIN_SEPARATOR("@");
const std::string DC_SEPARATOR(".");
const std::string DC("DC");
@@ -101,7 +79,6 @@ std::string getDomainFromSubject(std::string subject)
}
return domain;
}
-
}
SslSocket::SslSocket() : socket(0), prototype(0)
@@ -326,16 +303,6 @@ int SslSocket::write(const void *buf, size_t count) const
return PR_Write(socket, buf, count);
}
-uint16_t SslSocket::getLocalPort() const
-{
- return std::atoi(getService(impl->fd, true).c_str());
-}
-
-uint16_t SslSocket::getRemotePort() const
-{
- return atoi(getService(impl->fd, true).c_str());
-}
-
void SslSocket::setTcpNoDelay(bool nodelay) const
{
if (nodelay) {
diff --git a/cpp/src/qpid/sys/ssl/SslSocket.h b/cpp/src/qpid/sys/ssl/SslSocket.h
index eabadcbe23..4d28b231a0 100644
--- a/cpp/src/qpid/sys/ssl/SslSocket.h
+++ b/cpp/src/qpid/sys/ssl/SslSocket.h
@@ -76,9 +76,6 @@ public:
int read(void *buf, size_t count) const;
int write(const void *buf, size_t count) const;
- uint16_t getLocalPort() const;
- uint16_t getRemotePort() const;
-
int getKeyLen() const;
std::string getClientAuthId() const;