diff -NarpU5 iperf-2.0.8/src/Client.cpp iperf-2.0.8.bindfail/src/Client.cpp
--- iperf-2.0.8/src/Client.cpp 2015-04-02 16:51:48.000000000 -0400
+++ iperf-2.0.8.bindfail/src/Client.cpp 2015-04-10 10:05:38.279936555 -0400
@@ -701,20 +701,20 @@ void Client::Connect( ) {
AF_INET
#endif
: AF_INET);
mSettings->mSock = socket( domain, type, 0 );
- WARN_errno( mSettings->mSock == INVALID_SOCKET, "socket" );
+ FAIL_errno( mSettings->mSock == INVALID_SOCKET, "socket", mSettings );
SetSocketOptions( mSettings );
SockAddr_localAddr( mSettings );
if ( mSettings->mLocalhost != NULL ) {
// bind socket to local address
rc = bind( mSettings->mSock, (sockaddr*) &mSettings->local,
SockAddr_get_sizeof_sockaddr( &mSettings->local ) );
- WARN_errno( rc == SOCKET_ERROR, "bind" );
+ FAIL_errno( rc == SOCKET_ERROR, "bind", mSettings );
}
// connect socket
rc = connect( mSettings->mSock, (sockaddr*) &mSettings->peer,
SockAddr_get_sizeof_sockaddr( &mSettings->peer ));
FAIL_errno( rc == SOCKET_ERROR, "connect", mSettings );
diff -NarpU5 iperf-2.0.8/src/Listener.cpp iperf-2.0.8.bindfail/src/Listener.cpp
--- iperf-2.0.8/src/Listener.cpp 2015-04-02 16:51:48.000000000 -0400
+++ iperf-2.0.8.bindfail/src/Listener.cpp 2015-04-10 10:06:23.279699885 -0400
@@ -342,11 +342,11 @@ void Listener::Listen( ) {
WARN_errno( rc == SOCKET_ERROR, "WSAJoinLeaf (aka bind)" );
} else
#endif
{
rc = bind( mSettings->mSock, (sockaddr*) &mSettings->local, mSettings->size_local );
- WARN_errno( rc == SOCKET_ERROR, "bind" );
+ FAIL_errno( rc == SOCKET_ERROR, "bind", mSettings );
}
// listen for connections (TCP only).
// default backlog traditionally 5
if ( !isUDP( mSettings ) ) {
rc = listen( mSettings->mSock, 5 );
|