summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sal/osl/unx/pipe.c4
-rw-r--r--sal/osl/unx/socket.c12
2 files changed, 4 insertions, 12 deletions
diff --git a/sal/osl/unx/pipe.c b/sal/osl/unx/pipe.c
index 38a14134d..1ae6fb4fc 100644
--- a/sal/osl/unx/pipe.c
+++ b/sal/osl/unx/pipe.c
@@ -359,12 +359,10 @@ void SAL_CALL osl_closePipe( oslPipe pPipe )
len = sizeof(addr);
nRet = connect( fd, (struct sockaddr *)&addr, len);
-#if OSL_DEBUG_LEVEL > 1
if ( nRet < 0 )
{
- perror("connect in osl_destroyPipe");
+ OSL_TRACE("connect in osl_destroyPipe failed with error: %s", strerror(errno));
}
-#endif /* OSL_DEBUG_LEVEL */
close(fd);
}
#endif /* LINUX */
diff --git a/sal/osl/unx/socket.c b/sal/osl/unx/socket.c
index 3f317791f..b9fb92e42 100644
--- a/sal/osl/unx/socket.c
+++ b/sal/osl/unx/socket.c
@@ -1705,12 +1705,10 @@ void SAL_CALL osl_closeSocket(oslSocket pSocket)
socklen_t nSockLen = sizeof(s.aSockAddr);
nRet = getsockname(nFD, &s.aSockAddr, &nSockLen);
-#if OSL_DEBUG_LEVEL > 1
if ( nRet < 0 )
{
- perror("getsockname");
+ OSL_TRACE("getsockname call failed with error: %s", strerror(errno));
}
-#endif /* OSL_DEBUG_LEVEL */
if ( s.aSockAddr.sa_family == AF_INET )
{
@@ -1720,20 +1718,16 @@ void SAL_CALL osl_closeSocket(oslSocket pSocket)
}
nConnFD = socket(AF_INET, SOCK_STREAM, 0);
-#if OSL_DEBUG_LEVEL > 1
if ( nConnFD < 0 )
{
- perror("socket");
+ OSL_TRACE("socket call failed with error: %s", strerror(errno));
}
-#endif /* OSL_DEBUG_LEVEL */
nRet = connect(nConnFD, &s.aSockAddr, sizeof(s.aSockAddr));
-#if OSL_DEBUG_LEVEL > 1
if ( nRet < 0 )
{
- perror("connect");
+ OSL_TRACE("connect call failed with error: %s", strerror(errno));
}
-#endif /* OSL_DEBUG_LEVEL */
close(nConnFD);
}
pSocket->m_bIsAccepting = sal_False;