Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

log errno names instead of values #5

Merged
merged 2 commits into from
Aug 17, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 6 additions & 6 deletions apps/clicktocall/HttpBase.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@ HttpBase::HttpBase( int port, IpVersion ipVer, const Data& realm ):
mTuple(Data::Empty,port,ipVer,TCP,Data::Empty)
{
NumericError search;
#ifdef _WIN32
#ifdef _WIN32
ErrnoError WinObj;
WinObj.CreateMappingErrorMsg();
#elif __linux__
#elif __linux__
ErrnoError ErrornoObj;
ErrornoObj.CreateMappingErrorMsg();
#endif
#endif

sane = true;

Expand Down Expand Up @@ -160,13 +160,13 @@ HttpBase::process(FdSet& fdset)
if ( sock == SOCKET_ERROR )
{
NumericError search;
#ifdef _WIN32
#ifdef _WIN32
ErrnoError WinObj;
WinObj.CreateMappingErrorMsg();
#elif __linux__
#elif __linux__
ErrnoError ErrornoObj;
ErrornoObj.CreateMappingErrorMsg();
#endif
#endif

int e = getErrno();
switch (e)
Expand Down
12 changes: 6 additions & 6 deletions apps/clicktocall/HttpConnection.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -215,13 +215,13 @@ HttpConnection::processSomeReads()
if (bytesRead == INVALID_SOCKET)
{
NumericError search;
#ifdef _WIN32
#ifdef _WIN32
ErrnoError WinObj;
WinObj.CreateMappingErrorMsg();
#elif __linux__
#elif __linux__
ErrnoError ErrornoObj;
ErrornoObj.CreateMappingErrorMsg();
#endif
#endif

int e = getErrno();
switch (e)
Expand Down Expand Up @@ -357,13 +357,13 @@ HttpConnection::processSomeWrites()
if (bytesWritten == INVALID_SOCKET)
{
NumericError search;
#ifdef _WIN32
#ifdef _WIN32
ErrnoError WinObj;
WinObj.CreateMappingErrorMsg();
#elif __linux__
#elif __linux__
ErrnoError ErrornoObj;
ErrornoObj.CreateMappingErrorMsg();
#endif
#endif

int e = getErrno();
InfoLog (<< "HttpConnection failed write on " << mSock << " " << search.SearchErrorMsg(e,OSERROR) );
Expand Down
12 changes: 6 additions & 6 deletions apps/clicktocall/XmlRpcConnection.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,13 @@ XmlRpcConnection::processSomeReads()
if (bytesRead == INVALID_SOCKET)
{
NumericError search;
#ifdef _WIN32
#ifdef _WIN32
ErrnoError WinObj;
WinObj.CreateMappingErrorMsg();
#elif __linux__
#elif __linux__
ErrnoError ErrornoObj;
ErrornoObj.CreateMappingErrorMsg();
#endif
#endif

int e = getErrno();
XmlRpcServerBase::logSocketError(e);
Expand Down Expand Up @@ -200,13 +200,13 @@ XmlRpcConnection::processSomeWrites()
if (bytesWritten == INVALID_SOCKET)
{
NumericError search;
#ifdef _WIN32
#ifdef _WIN32
ErrnoError WinObj;
WinObj.CreateMappingErrorMsg();
#elif __linux__
#elif __linux__
ErrnoError ErrornoObj;
ErrornoObj.CreateMappingErrorMsg();
#endif
#endif

int e = getErrno();
XmlRpcServerBase::logSocketError(e);
Expand Down
18 changes: 9 additions & 9 deletions apps/clicktocall/XmlRpcServerBase.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ XmlRpcServerBase::XmlRpcServerBase(int port, IpVersion ipVer) :
mSane(true)
{
NumericError search;
#ifdef _WIN32
#ifdef _WIN32
ErrnoError WinObj;
WinObj.CreateMappingErrorMsg();
#elif __linux__
#elif __linux__
ErrnoError ErrornoObj;
ErrornoObj.CreateMappingErrorMsg();
#endif
#endif

#ifdef USE_IPV6
mFd = ::socket(ipVer == V4 ? PF_INET : PF_INET6, SOCK_STREAM, 0);
Expand Down Expand Up @@ -168,13 +168,13 @@ XmlRpcServerBase::process(FdSet& fdset)
if (sock == SOCKET_ERROR)
{
NumericError search;
#ifdef _WIN32
#ifdef _WIN32
ErrnoError WinObj;
WinObj.CreateMappingErrorMsg();
#elif __linux__
#elif __linux__
ErrnoError ErrornoObj;
ErrornoObj.CreateMappingErrorMsg();
#endif
#endif

int e = getErrno();
switch (e)
Expand Down Expand Up @@ -257,13 +257,13 @@ void
XmlRpcServerBase::logSocketError(int e)
{
NumericError search;
#ifdef _WIN32
#ifdef _WIN32
ErrnoError WinObj;
WinObj.CreateMappingErrorMsg();
#elif __linux__
#elif __linux__
ErrnoError ErrornoObj;
ErrornoObj.CreateMappingErrorMsg();
#endif
#endif

switch (e)
{
Expand Down
18 changes: 9 additions & 9 deletions apps/ichat-gw/MediaRelay.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -162,13 +162,13 @@ resip::Socket
MediaRelay::createRelaySocket(resip::Tuple& tuple)
{
NumericError search;
#ifdef _WIN32
#ifdef _WIN32
ErrnoError WinObj;
WinObj.CreateMappingErrorMsg();
#elif __linux__
#elif __linux__
ErrnoError ErrornoObj;
ErrornoObj.CreateMappingErrorMsg();
#endif
#endif

resip::Socket fd;

Expand Down Expand Up @@ -398,13 +398,13 @@ bool
MediaRelay::processWrites(FdSet& fdset, MediaRelayPort* relayPort)
{
NumericError search;
#ifdef _WIN32
#ifdef _WIN32
ErrnoError WinObj;
WinObj.CreateMappingErrorMsg();
#elif __linux__
#elif __linux__
ErrnoError ErrornoObj;
ErrornoObj.CreateMappingErrorMsg();
#endif
#endif

resip::Socket fd = INVALID_SOCKET;
Tuple tuple;
Expand Down Expand Up @@ -535,13 +535,13 @@ MediaRelay::processReads(FdSet& fdset, MediaRelayPort* relayPort)
if ( len == SOCKET_ERROR )
{
NumericError search;
#ifdef _WIN32
#ifdef _WIN32
ErrnoError WinObj;
WinObj.CreateMappingErrorMsg();
#elif __linux__
#elif __linux__
ErrnoError ErrornoObj;
ErrornoObj.CreateMappingErrorMsg();
#endif
#endif

int err = getErrno();
if ( err != EWOULDBLOCK )
Expand Down
12 changes: 6 additions & 6 deletions repro/HttpBase.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@ HttpBase::HttpBase( int port, IpVersion ipVer, const Data& realm, const resip::D
mTuple(ipAddr,port,ipVer,TCP,Data::Empty)
{
NumericError search;
#ifdef _WIN32
#ifdef _WIN32
ErrnoError WinObj;
WinObj.CreateMappingErrorMsg();
#elif __linux__
#elif __linux__
ErrnoError ErrornoObj;
ErrornoObj.CreateMappingErrorMsg();
#endif
#endif

// !rwm! [TODO] check that this works for IPv6
//assert( ipVer == V4 );
Expand Down Expand Up @@ -183,13 +183,13 @@ HttpBase::process(FdSet& fdset)
if ( sock == SOCKET_ERROR )
{
NumericError search;
#ifdef _WIN32
#ifdef _WIN32
ErrnoError WinObj;
WinObj.CreateMappingErrorMsg();
#elif __linux__
#elif __linux__
ErrnoError ErrornoObj;
ErrornoObj.CreateMappingErrorMsg();
#endif
#endif

int e = getErrno();
switch (e)
Expand Down
12 changes: 6 additions & 6 deletions repro/HttpConnection.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -222,13 +222,13 @@ HttpConnection::processSomeReads()
if (bytesRead == INVALID_SOCKET)
{
NumericError search;
#ifdef _WIN32
#ifdef _WIN32
ErrnoError WinObj;
WinObj.CreateMappingErrorMsg();
#elif __linux__
#elif __linux__
ErrnoError ErrornoObj;
ErrornoObj.CreateMappingErrorMsg();
#endif
#endif

int e = getErrno();
switch (e)
Expand Down Expand Up @@ -376,13 +376,13 @@ HttpConnection::processSomeWrites()
if (bytesWritten == INVALID_SOCKET)
{
NumericError search;
#ifdef _WIN32
#ifdef _WIN32
ErrnoError WinObj;
WinObj.CreateMappingErrorMsg();
#elif __linux__
#elif __linux__
ErrnoError ErrornoObj;
ErrornoObj.CreateMappingErrorMsg();
#endif
#endif

int e = getErrno();
InfoLog (<< "HttpConnection failed write on " << mSock << " " << search.SearchErrorMsg(e,OSERROR) );
Expand Down
6 changes: 3 additions & 3 deletions repro/RegSyncClient.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,13 @@ void
RegSyncClient::thread()
{
NumericError search;
#ifdef _WIN32
#ifdef _WIN32
ErrnoError WinObj;
WinObj.CreateMappingErrorMsg();
#elif __linux__
#elif __linux__
ErrnoError ErrornoObj;
ErrornoObj.CreateMappingErrorMsg();
#endif
#endif

int rc;

Expand Down
12 changes: 6 additions & 6 deletions repro/XmlRpcConnection.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,13 @@ XmlRpcConnection::processSomeReads()
if (bytesRead == INVALID_SOCKET)
{
NumericError search;
#ifdef _WIN32
#ifdef _WIN32
ErrnoError WinObj;
WinObj.CreateMappingErrorMsg();
#elif __linux__
#elif __linux__
ErrnoError ErrornoObj;
ErrornoObj.CreateMappingErrorMsg();
#endif
#endif

int e = getErrno();
XmlRpcServerBase::logSocketError(e);
Expand Down Expand Up @@ -196,13 +196,13 @@ XmlRpcConnection::processSomeWrites()
if (bytesWritten == INVALID_SOCKET)
{
NumericError search;
#ifdef _WIN32
#ifdef _WIN32
ErrnoError WinObj;
WinObj.CreateMappingErrorMsg();
#elif __linux__
#elif __linux__
ErrnoError ErrornoObj;
ErrornoObj.CreateMappingErrorMsg();
#endif
#endif

int e = getErrno();
XmlRpcServerBase::logSocketError(e);
Expand Down
18 changes: 9 additions & 9 deletions repro/XmlRpcServerBase.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ XmlRpcServerBase::XmlRpcServerBase(int port, IpVersion ipVer, Data ipAddr) :
mSane(true)
{
NumericError search;
#ifdef _WIN32
#ifdef _WIN32
ErrnoError WinObj;
WinObj.CreateMappingErrorMsg();
#elif __linux__
#elif __linux__
ErrnoError ErrornoObj;
ErrornoObj.CreateMappingErrorMsg();
#endif
#endif

#ifdef USE_IPV6
mFd = ::socket(ipVer == V4 ? PF_INET : PF_INET6, SOCK_STREAM, 0);
Expand Down Expand Up @@ -211,13 +211,13 @@ XmlRpcServerBase::process(FdSet& fdset)
if (sock == SOCKET_ERROR)
{
NumericError search;
#ifdef _WIN32
#ifdef _WIN32
ErrnoError WinObj;
WinObj.CreateMappingErrorMsg();
#elif __linux__
#elif __linux__
ErrnoError ErrornoObj;
ErrornoObj.CreateMappingErrorMsg();
#endif
#endif

int e = getErrno();
switch (e)
Expand Down Expand Up @@ -310,13 +310,13 @@ void
XmlRpcServerBase::logSocketError(int e)
{
NumericError search;
#ifdef _WIN32
#ifdef _WIN32
ErrnoError WinObj;
WinObj.CreateMappingErrorMsg();
#elif __linux__
#elif __linux__
ErrnoError ErrornoObj;
ErrornoObj.CreateMappingErrorMsg();
#endif
#endif

switch (e)
{
Expand Down