From d2ac73f3ae3d1cb8dde1f525e09f9854f046364d Mon Sep 17 00:00:00 2001 From: Jeff Hill Date: Wed, 20 Aug 2003 16:07:20 +0000 Subject: [PATCH] upgraded ipAddrToAscii API and improved shutdown procedures --- src/ca/cac.cpp | 9 ++++++--- src/ca/cac.h | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/ca/cac.cpp b/src/ca/cac.cpp index 982482a85..7cbea0f37 100644 --- a/src/ca/cac.cpp +++ b/src/ca/cac.cpp @@ -136,11 +136,11 @@ extern "C" void cacOnceFunc ( void * ) // cac::cac () // cac::cac ( cacNotify & notifyIn ) : - ipToAEngine ( "dnsQuery" ), programBeginTime ( epicsTime::getCurrent() ), connTMO ( CA_CONN_VERIFY_PERIOD ), cbMutex ( notifyIn ), globalServiceList ( globalServiceListCAC.getReference () ), + ipToAEngine ( ipAddrToAsciiEngine::allocate () ), timerQueue ( epicsTimerQueueActive::allocate ( false, lowestPriorityLevelAbove(epicsThreadGetPrioritySelf()) ) ), pUserName ( 0 ), @@ -299,6 +299,8 @@ cac::~cac () this->timerQueue.release (); + this->ipToAEngine.release (); + errlogFlush (); // its ok for channels and subscriptions to still @@ -554,8 +556,9 @@ bool cac::transferChanToVirtCircuit ( char acc[64]; pChan->getPIIU()->hostName ( acc, sizeof ( acc ) ); msgForMultiplyDefinedPV * pMsg = new ( this->mdpvFreeList ) - msgForMultiplyDefinedPV ( *this, pChan->pName (), acc, addr ); - pMsg->ioInitiate ( this->ipToAEngine ); + msgForMultiplyDefinedPV ( this->ipToAEngine, + *this, pChan->pName (), acc ); + pMsg->ioInitiate ( addr ); } return false; } diff --git a/src/ca/cac.h b/src/ca/cac.h index 4823a2184..5da33e455 100644 --- a/src/ca/cac.h +++ b/src/ca/cac.h @@ -193,7 +193,6 @@ public: private: localHostName hostNameCache; - ipAddrToAsciiEngine ipToAEngine; cacServiceList services; chronIntIdResTable < nciu > chanTable; // @@ -242,6 +241,7 @@ private: epicsSingleton < cacServiceList >::reference globalServiceList; + ipAddrToAsciiEngine & ipToAEngine; epicsTimerQueueActive & timerQueue; char * pUserName; class udpiiu * pudpiiu;