diff options
Diffstat (limited to 'cpp/src/qpid/sys/epoll')
-rw-r--r-- | cpp/src/qpid/sys/epoll/EpollPoller.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/cpp/src/qpid/sys/epoll/EpollPoller.cpp b/cpp/src/qpid/sys/epoll/EpollPoller.cpp index c23403c66d..6fdf99637f 100644 --- a/cpp/src/qpid/sys/epoll/EpollPoller.cpp +++ b/cpp/src/qpid/sys/epoll/EpollPoller.cpp @@ -20,7 +20,6 @@ */ #include "qpid/sys/Poller.h" -#include "qpid/sys/IOHandle.h" #include "qpid/sys/Mutex.h" #include "qpid/sys/AtomicCount.h" #include "qpid/sys/DeletionManager.h" @@ -64,12 +63,12 @@ class PollerHandlePrivate { }; ::__uint32_t events; - const IOHandlePrivate* ioHandle; + const IOHandle* ioHandle; PollerHandle* pollerHandle; FDStat stat; Mutex lock; - PollerHandlePrivate(const IOHandlePrivate* h, PollerHandle* p) : + PollerHandlePrivate(const IOHandle* h, PollerHandle* p) : events(0), ioHandle(h), pollerHandle(p), @@ -77,7 +76,7 @@ class PollerHandlePrivate { } int fd() const { - return toFd(ioHandle); + return ioHandle->fd; } bool isActive() const { @@ -138,7 +137,7 @@ class PollerHandlePrivate { }; PollerHandle::PollerHandle(const IOHandle& h) : - impl(new PollerHandlePrivate(h.impl, this)) + impl(new PollerHandlePrivate(&h, this)) {} PollerHandle::~PollerHandle() { @@ -385,6 +384,7 @@ void PollerPrivate::resetMode(PollerHandlePrivate& eh) { int rc = ::epoll_ctl(epollFd, EPOLL_CTL_MOD, eh.fd(), &epe); // If something has closed the fd in the meantime try adding it back if (rc ==-1 && errno == ENOENT) { + eh.setIdle(); // Reset our handle as if starting from scratch rc = ::epoll_ctl(epollFd, EPOLL_CTL_ADD, eh.fd(), &epe); } QPID_POSIX_CHECK(rc); |