repeaterSubscribeTimer.patch from lp:1479316

This commit is contained in:
Ambroz Bizjak
2015-08-18 14:24:10 -04:00
committed by Michael Davidsaver
parent 050b9f9a48
commit b6fbea9610
4 changed files with 11 additions and 5 deletions

View File

@@ -66,6 +66,8 @@ void repeaterSubscribeTimer::shutdown (
epicsTimerNotify::expireStatus repeaterSubscribeTimer::
expire ( const epicsTime & /* currentTime */ )
{
epicsGuard < epicsMutex > guard ( this->stateMutex );
static const unsigned nTriesToMsg = 50;
if ( this->attempts > nTriesToMsg && ! this->once ) {
callbackManager mgr ( this->ctxNotify, this->cbMutex );
@@ -90,14 +92,17 @@ epicsTimerNotify::expireStatus repeaterSubscribeTimer::
}
}
void repeaterSubscribeTimer::show ( unsigned /* level */ ) const
void repeaterSubscribeTimer::show ( unsigned /* level */ )
{
epicsGuard < epicsMutex > guard ( this->stateMutex );
::printf ( "repeater subscribe timer: attempts=%u registered=%u once=%u\n",
this->attempts, this->registered, this->once );
}
void repeaterSubscribeTimer::confirmNotify ()
{
epicsGuard < epicsMutex > guard ( this->stateMutex );
this->registered = true;
}