From 181d5f4ff00ad14f7615535b7986e5553b4e7939 Mon Sep 17 00:00:00 2001 From: Jeff Hill Date: Tue, 22 Apr 2003 18:07:50 +0000 Subject: [PATCH] remove channels from circuit in timer expire callback --- src/ca/cac.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/ca/cac.cpp b/src/ca/cac.cpp index d673da783..5762f18ad 100644 --- a/src/ca/cac.cpp +++ b/src/ca/cac.cpp @@ -507,10 +507,10 @@ void cac::repeaterSubscribeConfirmNotify () } } -bool cac::lookupChannelAndTransferToTCP ( - epicsGuard < callbackMutex > & cbGuard, unsigned cid, unsigned sid, - ca_uint16_t typeCode, arrayElementCount count, - unsigned minorVersionNumber, const osiSockAddr & addr ) +bool cac::transferChanToVirtCircuit ( + epicsGuard < callbackMutex > & cbGuard, unsigned cid, unsigned sid, + ca_uint16_t typeCode, arrayElementCount count, + unsigned minorVersionNumber, const osiSockAddr & addr ) { bool newIIU = false; tcpiiu * piiu = 0; @@ -1506,6 +1506,11 @@ void cac::initiateAbortShutdown ( tcpiiu & iiu ) { epicsGuard < callbackMutex > cbGuard ( this->cbMutex ); epicsGuard < cacMutex > guard ( this->mutex ); + // Disconnect all channels immediately from the timer thread + // because on certain OS such as HPUX its difficult to + // unblock a blocking send() call, and we need immediate + // disconnect notification. + iiu.removeAllChannels ( cbGuard, guard, *this ); iiu.initiateAbortShutdown ( cbGuard, guard ); }