Bugfixes for compiling with -DDEBUG

This commit is contained in:
Ralph Lange
2004-02-03 13:42:42 +00:00
parent 2a8a75fdc9
commit 429a135265
6 changed files with 36 additions and 28 deletions

View File

@@ -27,10 +27,11 @@
tcpSendWatchdog::tcpSendWatchdog (
epicsMutex & cbMutexIn, cacContextNotify & ctxNotifyIn,
tcpiiu & iiuIn, double periodIn, epicsTimerQueue & queueIn ) :
period ( periodIn ), timer ( queueIn.createTimer () ),
cbMutex ( cbMutexIn ), ctxNotify ( ctxNotifyIn ),
iiu ( iiuIn )
epicsMutex & mutexIn, tcpiiu & iiuIn,
double periodIn, epicsTimerQueue & queueIn ) :
period ( periodIn ), timer ( queueIn.createTimer () ),
cbMutex ( cbMutexIn ), ctxNotify ( ctxNotifyIn ),
mutex ( mutexIn ), iiu ( iiuIn )
{
}
@@ -50,8 +51,9 @@ epicsTimerNotify::expireStatus tcpSendWatchdog::expire (
"application schedualing problem\n" );
}
# ifdef DEBUG
epicsGuard < epicsMutex > guard ( this->mutex );
char hostName[128];
this->iiu.hostName ( hostName, sizeof ( hostName ) );
this->iiu.hostName ( guard, hostName, sizeof ( hostName ) );
debugPrintf ( ( "Request not accepted by CA server %s for %g sec. Disconnecting.\n",
hostName, this->period ) );
# endif