getHostName returns string size
This commit is contained in:
@@ -359,7 +359,7 @@ void tcpiiu::recvBytes (
|
||||
// because it reqires a callback lock which probably
|
||||
// isnt appropriate here
|
||||
char name[64];
|
||||
this->hostNameCacheInstance.hostName (
|
||||
this->hostNameCacheInstance.getName (
|
||||
name, sizeof ( name ) );
|
||||
errlogPrintf (
|
||||
"Unexpected problem with CA circuit to"
|
||||
@@ -891,7 +891,7 @@ void tcpiiu::unresponsiveCircuitNotify (
|
||||
|
||||
if ( this->connectedList.count() ) {
|
||||
char hostNameTmp[128];
|
||||
this->hostName ( guard, hostNameTmp, sizeof ( hostNameTmp ) );
|
||||
this->getHostName ( guard, hostNameTmp, sizeof ( hostNameTmp ) );
|
||||
genLocalExcep ( cbGuard, guard, this->cacRef,
|
||||
ECA_UNRESPTMO, hostNameTmp );
|
||||
while ( nciu * pChan = this->connectedList.get () ) {
|
||||
@@ -1008,7 +1008,7 @@ void tcpiiu::show ( unsigned level ) const
|
||||
{
|
||||
epicsGuard < epicsMutex > locker ( this->mutex );
|
||||
char buf[256];
|
||||
this->hostNameCacheInstance.hostName ( buf, sizeof ( buf ) );
|
||||
this->hostNameCacheInstance.getName ( buf, sizeof ( buf ) );
|
||||
::printf ( "Virtual circuit to \"%s\" at version V%u.%u state %u\n",
|
||||
buf, CA_MAJOR_PROTOCOL_REVISION,
|
||||
this->minorProtocolVersion, this->state );
|
||||
@@ -1699,21 +1699,19 @@ void tcpiiu::requestRecvProcessPostponedFlush (
|
||||
this->recvProcessPostponedFlush = true;
|
||||
}
|
||||
|
||||
void tcpiiu::hostName (
|
||||
unsigned tcpiiu::getHostName (
|
||||
epicsGuard < epicsMutex > & guard,
|
||||
char *pBuf, unsigned bufLength ) const
|
||||
char * pBuf, unsigned bufLength ) const throw ()
|
||||
{
|
||||
guard.assertIdenticalMutex ( this->mutex );
|
||||
this->hostNameCacheInstance.hostName ( pBuf, bufLength );
|
||||
return this->hostNameCacheInstance.getName ( pBuf, bufLength );
|
||||
}
|
||||
|
||||
const char * tcpiiu::pHostName (
|
||||
epicsGuard < epicsMutex > & guard ) const
|
||||
{
|
||||
guard.assertIdenticalMutex ( this->mutex );
|
||||
static char nameBuf [128];
|
||||
this->hostName ( guard, nameBuf, sizeof ( nameBuf ) );
|
||||
return nameBuf;
|
||||
return this->hostNameCacheInstance.pointer ();
|
||||
}
|
||||
|
||||
void tcpiiu::disconnectAllChannels (
|
||||
|
||||
@@ -1127,11 +1127,11 @@ double udpiiu::getRTTE () const
|
||||
return epicsMax ( this->rtteMean, minRoundTripEstimate );
|
||||
}
|
||||
|
||||
void udpiiu::hostName (
|
||||
unsigned udpiiu::getHostName (
|
||||
epicsGuard < epicsMutex > & cacGuard,
|
||||
char *pBuf, unsigned bufLength ) const
|
||||
char *pBuf, unsigned bufLength ) const throw ()
|
||||
{
|
||||
netiiu::hostName ( cacGuard, pBuf, bufLength );
|
||||
return netiiu::getHostName ( cacGuard, pBuf, bufLength );
|
||||
}
|
||||
|
||||
const char * udpiiu::pHostName (
|
||||
|
||||
@@ -177,9 +177,9 @@ private:
|
||||
const osiSockAddr &net_addr, const epicsTime & );
|
||||
|
||||
// netiiu stubs
|
||||
void hostName (
|
||||
unsigned getHostName (
|
||||
epicsGuard < epicsMutex > &, char * pBuf,
|
||||
unsigned bufLength ) const;
|
||||
unsigned bufLength ) const throw ();
|
||||
const char * pHostName (
|
||||
epicsGuard < epicsMutex > & ) const;
|
||||
bool ca_v41_ok (
|
||||
|
||||
@@ -148,9 +148,9 @@ public:
|
||||
bool ca_v49_ok (
|
||||
epicsGuard < epicsMutex > & ) const;
|
||||
|
||||
void hostName (
|
||||
unsigned getHostName (
|
||||
epicsGuard < epicsMutex > &,
|
||||
char *pBuf, unsigned bufLength ) const;
|
||||
char *pBuf, unsigned bufLength ) const throw ();
|
||||
bool alive (
|
||||
epicsGuard < epicsMutex > & ) const;
|
||||
bool connecting (
|
||||
|
||||
Reference in New Issue
Block a user