diff --git a/src/ca/tcpRecvWatchdog.cpp b/src/ca/tcpRecvWatchdog.cpp index 192dd9fa9..d8dfd333a 100644 --- a/src/ca/tcpRecvWatchdog.cpp +++ b/src/ca/tcpRecvWatchdog.cpp @@ -35,10 +35,12 @@ epicsTimerNotify::expireStatus tcpRecvWatchdog::expire ( const epicsTime & /* cu { if ( this->responsePending ) { this->cancel (); - char hostName[128]; - this->iiu.hostName ( hostName, sizeof (hostName) ); - this->iiu.printf ( "CA server \"%s\" unresponsive after %g inactive sec - disconnecting.\n", - hostName, this->period ); +# ifdef DEBUG + char hostName[128]; + this->iiu.hostName ( hostName, sizeof (hostName) ); + debugPrintf ( ( "CA server \"%s\" unresponsive after %g inactive sec - disconnecting.\n", + hostName, this->period ) ); +# endif this->iiu.forcedShutdown (); return noRestart; } diff --git a/src/ca/tcpSendWatchdog.cpp b/src/ca/tcpSendWatchdog.cpp index 8f6e62c4e..e9a598bea 100644 --- a/src/ca/tcpSendWatchdog.cpp +++ b/src/ca/tcpSendWatchdog.cpp @@ -30,10 +30,12 @@ tcpSendWatchdog::~tcpSendWatchdog () epicsTimerNotify::expireStatus tcpSendWatchdog::expire ( const epicsTime & /* currentTime */ ) { - char hostName[128]; - this->iiu.hostName ( hostName, sizeof ( hostName ) ); - this->iiu.printf ( "Request not accepted by CA server %s for %g sec. Disconnecting.\n", - hostName, this->period ); +# ifdef DEBUG + char hostName[128]; + this->iiu.hostName ( hostName, sizeof ( hostName ) ); + debugPrintf ( ( "Request not accepted by CA server %s for %g sec. Disconnecting.\n", + hostName, this->period ) ); +# endif this->iiu.forcedShutdown (); return noRestart; }