summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/sys/posix/PollableCondition.cpp
diff options
context:
space:
mode:
authorAndrew Stitcher <astitcher@apache.org>2012-10-24 05:51:31 +0000
committerAndrew Stitcher <astitcher@apache.org>2012-10-24 05:51:31 +0000
commit5d1d8481c376435051d5b24171dbb209c779b9ab (patch)
treeda83a8d381028880ab45f6486ade1cf8baa096b3 /cpp/src/qpid/sys/posix/PollableCondition.cpp
parentc61f7c0c79717b0eb842d0c4c88deeda9f7672e6 (diff)
downloadqpid-python-5d1d8481c376435051d5b24171dbb209c779b9ab.tar.gz
QPID-4272: Large amounts of code are duplicated between the SSL and TCP transports
Lift Socket into an interface with concrete implementations - BSDSocket, WinSocket and SslSocket - As a side effect completely change the approach we use for platform specific handles: IOHandle now directly carries the platform handle but its real type is only exposed to platform specific code. - Modified RDMA code for the new IOHandle approach git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1401559 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/sys/posix/PollableCondition.cpp')
-rw-r--r--cpp/src/qpid/sys/posix/PollableCondition.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/cpp/src/qpid/sys/posix/PollableCondition.cpp b/cpp/src/qpid/sys/posix/PollableCondition.cpp
index abff8a5be8..aa129faf20 100644
--- a/cpp/src/qpid/sys/posix/PollableCondition.cpp
+++ b/cpp/src/qpid/sys/posix/PollableCondition.cpp
@@ -21,7 +21,6 @@
#include "qpid/sys/PollableCondition.h"
#include "qpid/sys/DispatchHandle.h"
-#include "qpid/sys/IOHandle.h"
#include "qpid/sys/posix/PrivatePosix.h"
#include "qpid/Exception.h"
@@ -58,14 +57,14 @@ PollableConditionPrivate::PollableConditionPrivate(
const sys::PollableCondition::Callback& cb,
sys::PollableCondition& parent,
const boost::shared_ptr<sys::Poller>& poller
-) : IOHandle(new sys::IOHandlePrivate), cb(cb), parent(parent)
+) : cb(cb), parent(parent)
{
int fds[2];
if (::pipe(fds) == -1)
throw ErrnoException(QPID_MSG("Can't create PollableCondition"));
- impl->fd = fds[0];
+ fd = fds[0];
writeFd = fds[1];
- if (::fcntl(impl->fd, F_SETFL, O_NONBLOCK) == -1)
+ if (::fcntl(fd, F_SETFL, O_NONBLOCK) == -1)
throw ErrnoException(QPID_MSG("Can't create PollableCondition"));
if (::fcntl(writeFd, F_SETFL, O_NONBLOCK) == -1)
throw ErrnoException(QPID_MSG("Can't create PollableCondition"));