Fix to get around weird HP aCC behaviour ("C" linkage for friends):

caInstallDefaultService() calls a static member function instead of being a friend.
This commit is contained in:
Ralph Lange
2004-02-01 15:44:24 +00:00
parent 3d27e9aeb1
commit e6587e9755
2 changed files with 8 additions and 4 deletions

View File

@@ -727,14 +727,18 @@ cacContext & ca_client_context::createNetworkContext (
return * new cac ( mutexIn, cbMutexIn, *this );
}
void epicsShareAPI caInstallDefaultService ( cacService & service )
void ca_client_context::installDefaultService ( cacService & service )
{
// this wont consistently work if called from file scope constructor
epicsGuard < epicsMutex > guard ( ca_client_context::defaultServiceInstallMutex );
if ( ca_client_context::pDefaultService ) {
throw std::logic_error ( "CA in-memory service already installed and can't be replaced");
throw std::logic_error
( "CA in-memory service already installed and can't be replaced");
}
ca_client_context::pDefaultService = & service;
}
void epicsShareAPI caInstallDefaultService ( cacService & service )
{
ca_client_context::installDefaultService ( service );
}