added shutdown () sys call diagnostics

This commit is contained in:
Jeff Hill
2000-06-15 21:47:20 +00:00
parent 9a885db4d1
commit 7741f6b45c
2 changed files with 15 additions and 2 deletions
+7 -1
View File
@@ -506,8 +506,14 @@ void tcpiiu::shutdown ()
{
LOCK ( this->pcas );
if ( this->state != iiu_disconnected ) {
int status;
this->state = iiu_disconnected;
::shutdown ( this->sock, SD_BOTH );
status = ::shutdown ( this->sock, SD_BOTH );
if ( status ) {
errlogPrintf ("CAC TCP shutdown error was %s\n",
SOCKERRSTR (SOCKERRNO) );
}
cacRingBufferShutDown ( &this->send );
cacRingBufferShutDown ( &this->recv );
this->pcas->signalRecvActivityIIU ( *this );
+8 -1
View File
@@ -585,7 +585,14 @@ udpiiu::~udpiiu ()
*/
void udpiiu::shutdown ()
{
::shutdown (this->sock, SD_BOTH);
int status;
status = ::shutdown (this->sock, SD_BOTH);
if ( status ) {
errlogPrintf ( "CAC UDP shutdown error was %s\n",
SOCKERRSTR (SOCKERRNO) );
}
this->shutdownCmd = true;
semBinaryGive (this->xmitSignal);
}