fixed ca_name() returns the record name w/o appending the field name

This commit is contained in:
Jeff Hill
2004-10-19 21:05:39 +00:00
parent 3e05c90653
commit 7a5bdb93c4
2 changed files with 21 additions and 4 deletions

View File

@@ -46,6 +46,9 @@ dbChannelIO::dbChannelIO (
cacChannel ( notify ), mutex ( mutexIn ), serviceIO ( serviceIO ),
addr ( addrIn )
{
unsigned bufLen = dbNameSizeOfPV ( & this->addr ) + 1;
this->pNameStr.reset ( new char [ bufLen ] );
dbNameOfPV ( & this->addr, this->pNameStr.get (), bufLen );
}
void dbChannelIO::initiateConnect ( epicsGuard < epicsMutex > & guard )
@@ -175,11 +178,19 @@ unsigned long dbChannelIO::nativeElementCount (
return 0u;
}
const char *dbChannelIO::pName (
epicsGuard < epicsMutex > & guard ) const
// hopefully to be eventually phased out
const char * dbChannelIO::pName (
epicsGuard < epicsMutex > & guard ) const throw ()
{
guard.assertIdenticalMutex ( this->mutex );
return addr.precord->name;
return this->pNameStr.get ();
}
unsigned dbChannelIO::getName (
epicsGuard < epicsMutex > &,
char * pBuf, unsigned bufLen ) const throw ()
{
return dbNameOfPV ( & this->addr, pBuf, bufLen );
}
short dbChannelIO::nativeType (