=== modified file 'src/ca/tcpiiu.cpp' --- src/ca/tcpiiu.cpp 2010-09-20 21:21:50 +0000 +++ src/ca/tcpiiu.cpp 2011-01-15 00:53:33 +0000 @@ -1866,10 +1866,14 @@ guard.assertIdenticalMutex ( this->mutex ); while ( nciu * pChan = this->createReqPend.get () ) { + pChan->channelNode::listMember = + channelNode::cs_none; pChan->serviceShutdownNotify ( cbGuard, guard ); } while ( nciu * pChan = this->createRespPend.get () ) { + pChan->channelNode::listMember = + channelNode::cs_none; // we dont yet know the server's id so we cant // send a channel delete request and will instead // trust that the server can do the proper cleanup @@ -1878,12 +1882,16 @@ } while ( nciu * pChan = this->v42ConnCallbackPend.get () ) { + pChan->channelNode::listMember = + channelNode::cs_none; this->clearChannelRequest ( guard, pChan->getSID(guard), pChan->getCID(guard) ); pChan->serviceShutdownNotify ( cbGuard, guard ); } while ( nciu * pChan = this->subscripReqPend.get () ) { + pChan->channelNode::listMember = + channelNode::cs_none; pChan->disconnectAllIO ( cbGuard, guard ); this->clearChannelRequest ( guard, pChan->getSID(guard), pChan->getCID(guard) ); @@ -1891,6 +1899,8 @@ } while ( nciu * pChan = this->connectedList.get () ) { + pChan->channelNode::listMember = + channelNode::cs_none; pChan->disconnectAllIO ( cbGuard, guard ); this->clearChannelRequest ( guard, pChan->getSID(guard), pChan->getCID(guard) ); @@ -1898,6 +1908,8 @@ } while ( nciu * pChan = this->unrespCircuit.get () ) { + pChan->channelNode::listMember = + channelNode::cs_none; pChan->disconnectAllIO ( cbGuard, guard ); // if we know that the circuit is unresponsive // then we dont send a channel delete request and @@ -1907,6 +1919,8 @@ } while ( nciu * pChan = this->subscripUpdateReqPend.get () ) { + pChan->channelNode::listMember = + channelNode::cs_none; pChan->disconnectAllIO ( cbGuard, guard ); this->clearChannelRequest ( guard, pChan->getSID(guard), pChan->getCID(guard) ); === modified file 'src/libCom/osi/os/WIN32/osdThread.c' --- src/libCom/osi/os/WIN32/osdThread.c 2011-01-15 01:00:02 +0000 +++ src/libCom/osi/os/WIN32/osdThread.c 2011-02-11 22:33:58 +0000 @@ -630,18 +630,21 @@ free ( pParmWIN32 ); return NULL; } + + EnterCriticalSection ( & pGbl->mutex ); + ellAdd ( & pGbl->threadList, & pParmWIN32->node ); + LeaveCriticalSection ( & pGbl->mutex ); wstat = ResumeThread ( pParmWIN32->handle ); if (wstat==0xFFFFFFFF) { + EnterCriticalSection ( & pGbl->mutex ); + ellDelete ( & pGbl->threadList, & pParmWIN32->node ); + LeaveCriticalSection ( & pGbl->mutex ); CloseHandle ( pParmWIN32->handle ); free ( pParmWIN32 ); return NULL; } - EnterCriticalSection ( & pGbl->mutex ); - ellAdd ( & pGbl->threadList, & pParmWIN32->node ); - LeaveCriticalSection ( & pGbl->mutex ); - return ( epicsThreadId ) pParmWIN32; }