This commit is contained in:
Guenter Obiltschnig
2015-03-28 11:23:25 +01:00
parent c2528c3436
commit 8513b11a8f
2 changed files with 3 additions and 3 deletions

View File

@@ -24,9 +24,6 @@
#elif defined(POCO_HAVE_FD_POLL) #elif defined(POCO_HAVE_FD_POLL)
#include "Poco/SharedPtr.h" #include "Poco/SharedPtr.h"
#include <poll.h> #include <poll.h>
typedef Poco::SharedPtr<pollfd,
Poco::ReferenceCounter,
Poco::ReleaseArrayPolicy<pollfd> > SharedPollArray;
#endif #endif
@@ -213,6 +210,7 @@ int Socket::select(SocketList& readList, SocketList& writeList, SocketList& exce
return readList.size() + writeList.size() + exceptList.size(); return readList.size() + writeList.size() + exceptList.size();
#elif defined(POCO_HAVE_FD_POLL) #elif defined(POCO_HAVE_FD_POLL)
typedef Poco::SharedPtr<pollfd, Poco::ReferenceCounter, Poco::ReleaseArrayPolicy<pollfd> > SharedPollArray;
nfds_t nfd = readList.size() + writeList.size() + exceptList.size(); nfds_t nfd = readList.size() + writeList.size() + exceptList.size();
if (0 == nfd) return 0; if (0 == nfd) return 0;

View File

@@ -477,6 +477,8 @@ bool SocketImpl::poll(const Poco::Timespan& timeout, int mode)
} }
} }
while (rc < 0 && lastError() == POCO_EINTR); while (rc < 0 && lastError() == POCO_EINTR);
if (rc < 0) error();
return rc > 0;
#else #else