mirror of
https://github.com/pocoproject/poco.git
synced 2025-04-16 23:12:57 +02:00
giving up on strerror_r
This commit is contained in:
parent
28ff1f2530
commit
20c7392c21
@ -147,9 +147,7 @@ int Socket::select(SocketList& readList, SocketList& writeList, SocketList& exce
|
|||||||
epollfd = epoll_create(epollSize);
|
epollfd = epoll_create(epollSize);
|
||||||
if (epollfd < 0)
|
if (epollfd < 0)
|
||||||
{
|
{
|
||||||
char buf[1024];
|
SocketImpl::error("Can't create epoll queue");
|
||||||
(void) strerror_r(errno, buf, sizeof(buf));
|
|
||||||
SocketImpl::error(std::string("Can't create epoll queue: ") + buf);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (struct epoll_event* e = eventsIn; e != eventLast; ++e)
|
for (struct epoll_event* e = eventsIn; e != eventLast; ++e)
|
||||||
@ -159,10 +157,8 @@ int Socket::select(SocketList& readList, SocketList& writeList, SocketList& exce
|
|||||||
{
|
{
|
||||||
if (epoll_ctl(epollfd, EPOLL_CTL_ADD, sockfd, e) < 0)
|
if (epoll_ctl(epollfd, EPOLL_CTL_ADD, sockfd, e) < 0)
|
||||||
{
|
{
|
||||||
char buf[1024];
|
|
||||||
(void) strerror_r(errno, buf, sizeof(buf));
|
|
||||||
::close(epollfd);
|
::close(epollfd);
|
||||||
SocketImpl::error(std::string("Can't insert socket to epoll queue: ") + buf);
|
SocketImpl::error("Can't insert socket to epoll queue: ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -428,9 +428,7 @@ bool SocketImpl::poll(const Poco::Timespan& timeout, int mode)
|
|||||||
int epollfd = epoll_create(1);
|
int epollfd = epoll_create(1);
|
||||||
if (epollfd < 0)
|
if (epollfd < 0)
|
||||||
{
|
{
|
||||||
char buf[1024];
|
error("Can't create epoll queue");
|
||||||
(void) strerror_r(errno, buf, sizeof(buf));
|
|
||||||
error(std::string("Can't create epoll queue: ") + buf);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
struct epoll_event evin;
|
struct epoll_event evin;
|
||||||
@ -445,10 +443,8 @@ bool SocketImpl::poll(const Poco::Timespan& timeout, int mode)
|
|||||||
|
|
||||||
if (epoll_ctl(epollfd, EPOLL_CTL_ADD, sockfd, &evin) < 0)
|
if (epoll_ctl(epollfd, EPOLL_CTL_ADD, sockfd, &evin) < 0)
|
||||||
{
|
{
|
||||||
char buf[1024];
|
|
||||||
(void) strerror_r(errno, buf, sizeof(buf));
|
|
||||||
::close(epollfd);
|
::close(epollfd);
|
||||||
error(std::string("Can't insert socket to epoll queue: ") + buf);
|
error("Can't insert socket to epoll queue");
|
||||||
}
|
}
|
||||||
|
|
||||||
Poco::Timespan remainingTime(timeout);
|
Poco::Timespan remainingTime(timeout);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user