Merge remote-tracking branch 'pocoproject/develop' into develop

This commit is contained in:
Francis ANDRE 2016-09-08 11:57:29 +02:00
commit 19f753f1c5
2 changed files with 4 additions and 16 deletions

View File

@ -147,10 +147,7 @@ int Socket::select(SocketList& readList, SocketList& writeList, SocketList& exce
epollfd = epoll_create(epollSize);
if (epollfd < 0)
{
char buf[1024];
int rc = strerror_r(errno, buf, sizeof(buf));
poco_assert (rc == 0);
SocketImpl::error(std::string("Can't create epoll queue: ") + buf);
SocketImpl::error("Can't create epoll queue");
}
for (struct epoll_event* e = eventsIn; e != eventLast; ++e)
@ -160,11 +157,8 @@ int Socket::select(SocketList& readList, SocketList& writeList, SocketList& exce
{
if (epoll_ctl(epollfd, EPOLL_CTL_ADD, sockfd, e) < 0)
{
char buf[1024];
int rc = strerror_r(errno, buf, sizeof(buf));
::close(epollfd);
poco_assert (rc == 0);
SocketImpl::error(std::string("Can't insert socket to epoll queue: ") + buf);
SocketImpl::error("Can't insert socket to epoll queue: ");
}
}
}

View File

@ -428,10 +428,7 @@ bool SocketImpl::poll(const Poco::Timespan& timeout, int mode)
int epollfd = epoll_create(1);
if (epollfd < 0)
{
char buf[1024];
int rc = strerror_r(errno, buf, sizeof(buf));
poco_assert (rc == 0);
error(std::string("Can't create epoll queue: ") + buf);
error("Can't create epoll queue");
}
struct epoll_event evin;
@ -446,11 +443,8 @@ bool SocketImpl::poll(const Poco::Timespan& timeout, int mode)
if (epoll_ctl(epollfd, EPOLL_CTL_ADD, sockfd, &evin) < 0)
{
char buf[1024];
int rc = strerror_r(errno, buf, sizeof(buf));
::close(epollfd);
poco_assert (rc == 0);
error(std::string("Can't insert socket to epoll queue: ") + buf);
error("Can't insert socket to epoll queue");
}
Poco::Timespan remainingTime(timeout);