From 2c71674012ae23a210bff013ad24eec1cce01e6c Mon Sep 17 00:00:00 2001 From: Jeff Hill Date: Thu, 9 Aug 2001 00:55:05 +0000 Subject: [PATCH] supress disconnect message unles DEBUG is set --- src/ca/tcpRecvWatchdog.cpp | 10 ++++++---- src/ca/tcpSendWatchdog.cpp | 10 ++++++---- 2 files changed, 12 insertions(+), 8 deletions(-) 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; }