Make test bail out if socket bind fails; usually there's a CAS running.

This commit is contained in:
Andrew Johnson
2006-12-11 16:52:36 +00:00
parent bcc41d0e72
commit 11a865805e

View File

@@ -170,7 +170,10 @@ server::server ( const address & addrIn ) :
address tmpAddr = addrIn;
int status = bind ( this->sock,
& tmpAddr.sa, sizeof ( tmpAddr ) );
assert ( status == 0 );
if ( status ) {
testDiag ( "bind to server socket failed, status = %d", status );
testAbort ( "Stop all CA servers before running this test." );
}
status = listen ( this->sock, 10 );
assert ( status == 0 );
}