summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/sys
diff options
context:
space:
mode:
authorAndrew Stitcher <astitcher@apache.org>2009-03-04 04:22:50 +0000
committerAndrew Stitcher <astitcher@apache.org>2009-03-04 04:22:50 +0000
commit226868507b7d81df9e779f8472b38dbf4c44d14f (patch)
treefa264d419eac9d0880c45e67305eee47b79ff502 /cpp/src/qpid/sys
parent23b5cf86fe6ee3fe38281435b60db15c26d200fb (diff)
downloadqpid-python-226868507b7d81df9e779f8472b38dbf4c44d14f.tar.gz
QPID-1710 Removed unnecessary nonportable internal API
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@749894 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/sys')
-rw-r--r--cpp/src/qpid/sys/Socket.h4
-rw-r--r--cpp/src/qpid/sys/posix/AsynchIO.cpp2
-rw-r--r--cpp/src/qpid/sys/posix/Socket.cpp4
-rw-r--r--cpp/src/qpid/sys/ssl/SslIo.cpp2
-rw-r--r--cpp/src/qpid/sys/ssl/SslSocket.cpp4
-rw-r--r--cpp/src/qpid/sys/ssl/SslSocket.h2
6 files changed, 8 insertions, 10 deletions
diff --git a/cpp/src/qpid/sys/Socket.h b/cpp/src/qpid/sys/Socket.h
index ae48b8104d..9b749bdf5e 100644
--- a/cpp/src/qpid/sys/Socket.h
+++ b/cpp/src/qpid/sys/Socket.h
@@ -27,8 +27,6 @@
#include <string>
-struct sockaddr;
-
namespace qpid {
namespace sys {
@@ -93,7 +91,7 @@ public:
/** Accept a connection from a socket that is already listening
* and has an incoming connection
*/
- Socket* accept(struct sockaddr *addr, socklen_t *addrlen) const;
+ Socket* accept() const;
// TODO The following are raw operations, maybe they need better wrapping?
int read(void *buf, size_t count) const;
diff --git a/cpp/src/qpid/sys/posix/AsynchIO.cpp b/cpp/src/qpid/sys/posix/AsynchIO.cpp
index 9e2772e18a..a914dc817a 100644
--- a/cpp/src/qpid/sys/posix/AsynchIO.cpp
+++ b/cpp/src/qpid/sys/posix/AsynchIO.cpp
@@ -123,7 +123,7 @@ void AsynchAcceptorPrivate::readable(DispatchHandle& h) {
// TODO: Currently we ignore the peers address, perhaps we should
// log it or use it for connection acceptance.
try {
- s = socket.accept(0, 0);
+ s = socket.accept();
if (s) {
acceptedCallback(*s);
} else {
diff --git a/cpp/src/qpid/sys/posix/Socket.cpp b/cpp/src/qpid/sys/posix/Socket.cpp
index 415d5293ef..8e086c9a27 100644
--- a/cpp/src/qpid/sys/posix/Socket.cpp
+++ b/cpp/src/qpid/sys/posix/Socket.cpp
@@ -189,9 +189,9 @@ int Socket::listen(uint16_t port, int backlog) const
return ntohs(name.sin_port);
}
-Socket* Socket::accept(struct sockaddr *addr, socklen_t *addrlen) const
+Socket* Socket::accept() const
{
- int afd = ::accept(impl->fd, addr, addrlen);
+ int afd = ::accept(impl->fd, 0, 0);
if ( afd >= 0)
return new Socket(new IOHandlePrivate(afd));
else if (errno == EAGAIN)
diff --git a/cpp/src/qpid/sys/ssl/SslIo.cpp b/cpp/src/qpid/sys/ssl/SslIo.cpp
index 9be75af47d..624683ae7d 100644
--- a/cpp/src/qpid/sys/ssl/SslIo.cpp
+++ b/cpp/src/qpid/sys/ssl/SslIo.cpp
@@ -90,7 +90,7 @@ void SslAcceptor::readable(DispatchHandle& h) {
// TODO: Currently we ignore the peers address, perhaps we should
// log it or use it for connection acceptance.
try {
- s = socket.accept(0, 0);
+ s = socket.accept();
if (s) {
acceptedCallback(*s);
} else {
diff --git a/cpp/src/qpid/sys/ssl/SslSocket.cpp b/cpp/src/qpid/sys/ssl/SslSocket.cpp
index 597fbe57db..dc816b403b 100644
--- a/cpp/src/qpid/sys/ssl/SslSocket.cpp
+++ b/cpp/src/qpid/sys/ssl/SslSocket.cpp
@@ -201,9 +201,9 @@ int SslSocket::listen(uint16_t port, int backlog, const std::string& certName, b
return ntohs(name.sin_port);
}
-SslSocket* SslSocket::accept(struct sockaddr *addr, socklen_t *addrlen) const
+SslSocket* SslSocket::accept() const
{
- int afd = ::accept(impl->fd, addr, addrlen);
+ int afd = ::accept(impl->fd, 0, 0);
if ( afd >= 0) {
return new SslSocket(new IOHandlePrivate(afd), prototype);
} else if (errno == EAGAIN) {
diff --git a/cpp/src/qpid/sys/ssl/SslSocket.h b/cpp/src/qpid/sys/ssl/SslSocket.h
index a82e9133e8..7434667b78 100644
--- a/cpp/src/qpid/sys/ssl/SslSocket.h
+++ b/cpp/src/qpid/sys/ssl/SslSocket.h
@@ -64,7 +64,7 @@ public:
* Accept a connection from a socket that is already listening
* and has an incoming connection
*/
- SslSocket* accept(struct sockaddr *addr, socklen_t *addrlen) const;
+ SslSocket* accept() const;
// TODO The following are raw operations, maybe they need better wrapping?
int read(void *buf, size_t count) const;