mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-23 16:48:06 +02:00
added POCO_ENOERR
silence gcc warning and shiled from accidentally throwing on no error
This commit is contained in:
@@ -40,6 +40,9 @@
|
||||
#define Net_SocketDefs_INCLUDED
|
||||
|
||||
|
||||
#define POCO_ENOERR 0
|
||||
|
||||
|
||||
#if defined(POCO_OS_FAMILY_WINDOWS)
|
||||
#include "Poco/UnWindows.h"
|
||||
#include <winsock2.h>
|
||||
|
@@ -518,7 +518,7 @@ bool SocketImpl::poll(const Poco::Timespan& timeout, int mode)
|
||||
FD_SET(sockfd, &fdExcept);
|
||||
}
|
||||
Poco::Timespan remainingTime(timeout);
|
||||
int errorCode;
|
||||
int errorCode = POCO_ENOERR;
|
||||
int rc;
|
||||
do
|
||||
{
|
||||
@@ -892,8 +892,7 @@ void SocketImpl::setBlocking(bool flag)
|
||||
#else
|
||||
int arg = fcntl(F_GETFL);
|
||||
long flags = arg & ~O_NONBLOCK;
|
||||
if (!flag)
|
||||
flags |= O_NONBLOCK;
|
||||
if (!flag) flags |= O_NONBLOCK;
|
||||
(void) fcntl(F_SETFL, flags);
|
||||
#endif
|
||||
_blocking = flag;
|
||||
@@ -999,6 +998,7 @@ void SocketImpl::error(int code, const std::string& arg)
|
||||
{
|
||||
switch (code)
|
||||
{
|
||||
case POCO_ENOERR: return;
|
||||
case POCO_ESYSNOTREADY:
|
||||
throw NetException("Net subsystem not ready", code);
|
||||
case POCO_ENOTINIT:
|
||||
|
Reference in New Issue
Block a user