mirror of
https://github.com/pocoproject/poco.git
synced 2025-03-05 12:09:11 +01:00
fixed strerror_r issue
This commit is contained in:
parent
47b4ef97db
commit
28ff1f2530
@ -148,8 +148,7 @@ int Socket::select(SocketList& readList, SocketList& writeList, SocketList& exce
|
|||||||
if (epollfd < 0)
|
if (epollfd < 0)
|
||||||
{
|
{
|
||||||
char buf[1024];
|
char buf[1024];
|
||||||
int rc = strerror_r(errno, buf, sizeof(buf));
|
(void) strerror_r(errno, buf, sizeof(buf));
|
||||||
poco_assert (rc == 0);
|
|
||||||
SocketImpl::error(std::string("Can't create epoll queue: ") + buf);
|
SocketImpl::error(std::string("Can't create epoll queue: ") + buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -161,9 +160,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];
|
char buf[1024];
|
||||||
int rc = strerror_r(errno, buf, sizeof(buf));
|
(void) strerror_r(errno, buf, sizeof(buf));
|
||||||
::close(epollfd);
|
::close(epollfd);
|
||||||
poco_assert (rc == 0);
|
|
||||||
SocketImpl::error(std::string("Can't insert socket to epoll queue: ") + buf);
|
SocketImpl::error(std::string("Can't insert socket to epoll queue: ") + buf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -429,8 +429,7 @@ bool SocketImpl::poll(const Poco::Timespan& timeout, int mode)
|
|||||||
if (epollfd < 0)
|
if (epollfd < 0)
|
||||||
{
|
{
|
||||||
char buf[1024];
|
char buf[1024];
|
||||||
int rc = strerror_r(errno, buf, sizeof(buf));
|
(void) strerror_r(errno, buf, sizeof(buf));
|
||||||
poco_assert (rc == 0);
|
|
||||||
error(std::string("Can't create epoll queue: ") + buf);
|
error(std::string("Can't create epoll queue: ") + buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -447,9 +446,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];
|
char buf[1024];
|
||||||
int rc = strerror_r(errno, buf, sizeof(buf));
|
(void) strerror_r(errno, buf, sizeof(buf));
|
||||||
::close(epollfd);
|
::close(epollfd);
|
||||||
poco_assert (rc == 0);
|
|
||||||
error(std::string("Can't insert socket to epoll queue: ") + buf);
|
error(std::string("Can't insert socket to epoll queue: ") + buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user