fixed IIU disconnect problem

This commit is contained in:
Jeff Hill
2001-08-02 01:35:27 +00:00
parent d0e4a93563
commit c1e34b85fd

View File

@@ -1149,7 +1149,10 @@ void cac::connectAllIO ( nciu & chan )
// (lock must be applied here)
void cac::disconnectAllIO ( nciu & chan, bool enableCallbacks )
{
while ( baseNMIU *pNetIO = chan.cacPrivateListOfIO::eventq.get() ) {
tsDLIterBD<baseNMIU> pNetIO = chan.cacPrivateListOfIO::eventq.firstIter();
while ( pNetIO.valid() ) {
tsDLIterBD<baseNMIU> pNext = pNetIO;
pNext++;
if ( ! pNetIO->isSubscription () ) {
// no use after disconnected - so uninstall it
this->ioTable.remove ( *pNetIO );
@@ -1163,6 +1166,7 @@ void cac::disconnectAllIO ( nciu & chan, bool enableCallbacks )
}
pNetIO->destroy ( *this );
}
pNetIO = pNext;
}
}
@@ -1720,6 +1724,7 @@ void cac::uninstallIIU ( tcpiiu & iiu )
void cac::preemptiveCallbackLock()
{
// the count must be incremented prior to taking the lock
if ( ! this->enablePreemptiveCallback ) {
epicsAutoMutex autoMutex ( this->mutex );
assert ( this->recvThreadsPendingCount < UINT_MAX );