Comment 3 for bug 541275

Revision history for this message
Jeff Hill (johill-lanl) wrote :

It looks like these changes should resolve this issue

cvs diff -u -wb -i -- searchTimer.cpp udpiiu.cpp udpiiu.h (in directory D:\users\hill\R3.14.dll_hell_fix\epics\base\src\ca\)
Index: searchTimer.cpp
===================================================================
RCS file: /net/phoebus/epicsmgr/cvsroot/epics/base/src/ca/searchTimer.cpp,v
retrieving revision 1.33.2.14
diff -c -u -w -b -i -r1.33.2.14 searchTimer.cpp
cvs diff: conflicting specifications of output style
--- searchTimer.cpp 6 Jun 2006 22:53:04 -0000 1.33.2.14
+++ searchTimer.cpp 6 Jun 2006 23:12:42 -0000
@@ -44,6 +44,7 @@
         const unsigned indexIn,
         epicsMutex & mutexIn,
         bool boostPossibleIn ) :
+ timeAtLastSend ( epicsTime::getCurrent () ),
     timer ( queueIn.createTimer () ),
     iiu ( iiuIn ),
     mutex ( mutexIn ),
@@ -133,6 +134,8 @@
             guard, *pChan, this->index );
     }

+ this->timeAtLastSend = currentTime;
+
     // boost search period for channels not recently
     // searched for if there was some success
     if ( this->searchResponses && this->boostPossible ) {
@@ -273,8 +276,6 @@
     this->dgSeqNoAtTimerExpireEnd =
         this->iiu.datagramSeqNumber ( guard ) - 1u;

- this->timeAtLastSend = currentTime;
-
 # ifdef DEBUG
         if ( this->searchAttempts ) {
             char buf[64];
Index: udpiiu.cpp
===================================================================
RCS file: /net/phoebus/epicsmgr/cvsroot/epics/base/src/ca/udpiiu.cpp,v
retrieving revision 1.103.2.28
diff -c -u -w -b -i -r1.103.2.28 udpiiu.cpp
cvs diff: conflicting specifications of output style
--- udpiiu.cpp 22 Nov 2005 00:11:16 -0000 1.103.2.28
+++ udpiiu.cpp 6 Jun 2006 19:35:49 -0000
@@ -1115,13 +1115,19 @@

 void udpiiu::updateRTTE ( double measured )
 {
+ if ( measured > maxRoundTripEstimate ) {
+ measured = maxRoundTripEstimate;
+ }
+ if ( measured < minRoundTripEstimate ) {
+ measured = minRoundTripEstimate;
+ }
     double error = measured - this->rtteMean;
     this->rtteMean += 0.25 * error;
 }

 double udpiiu::getRTTE () const
 {
- return epicsMax ( this->rtteMean, minRoundTripEstimate );
+ return this->rtteMean;
 }

 unsigned udpiiu::getHostName (
Index: udpiiu.h
===================================================================
RCS file: /net/phoebus/epicsmgr/cvsroot/epics/base/src/ca/udpiiu.h,v
retrieving revision 1.24.2.15
diff -c -u -w -b -i -r1.24.2.15 udpiiu.h
cvs diff: conflicting specifications of output style
--- udpiiu.h 22 Nov 2005 00:11:16 -0000 1.24.2.15
+++ udpiiu.h 6 Jun 2006 19:35:51 -0000
@@ -80,6 +80,7 @@
 };

 static const double minRoundTripEstimate = 32e-3; // seconds
+static const double maxRoundTripEstimate = 10; // seconds
 static const double maxSearchPeriodDefault = 5.0 * 60.0; // seconds
 static const double maxSearchPeriodLowerLimit = 60.0; // seconds
 static const double beaconAnomalySearchPeriod = 5.0; // seconds

***** CVS exited normally with code 1 *****