optimized access to IIU

This commit is contained in:
Jeff Hill
2000-10-12 18:50:26 +00:00
parent 15e9d69a66
commit 39a7c4ad20
2 changed files with 7 additions and 7 deletions

View File

@@ -523,7 +523,7 @@ void nciu::attachChanToIIU ( netiiu &iiu )
void nciu::detachChanFromIIU ()
{
this->lockPIIU ();
if ( this->piiu ) {
if ( this->piiu ) {
this->piiu->mutex.lock ();
this->piiu->channelList.remove ( *this );
if ( this->piiu->channelList.count () == 0u ) {
@@ -589,9 +589,9 @@ void nciu::hostName ( char *pBuf, unsigned bufLength ) const
// deprecated - please do not use, this is _not_ thread safe
const char * nciu::pHostName () const
{
this->lockPIIU ();
this->lock ();
const char *pName = this->piiu->pHostName ();
this->unlockPIIU ();
this->unlock ();
return pName; // ouch !
}
@@ -599,14 +599,14 @@ bool nciu::ca_v42_ok () const
{
bool status;
this->lockPIIU ();
this->lock ();
if ( this->piiu ) {
status = this->piiu->ca_v42_ok ();
}
else {
status = false;
}
this->unlockPIIU ();
this->unlock ();
return status;
}

View File

@@ -145,7 +145,7 @@ inline bool nciu::connectionInProgress ( const osiSockAddr &addrIn )
{
bool status;
this->lockPIIU ();
this->lock ();
if ( this->piiu ) {
status = this->piiu->connectionInProgress ( this->pNameStr, addrIn );
@@ -154,7 +154,7 @@ inline bool nciu::connectionInProgress ( const osiSockAddr &addrIn )
status = false;
}
this->unlockPIIU ();
this->unlock ();
return status;
}