Bug 22 - StatisticsManager poll problem
Summary: StatisticsManager poll problem
Status: NEW
Alias: None
Product: resiprocate
Classification: Unclassified
Component: stack (libresip) (show other bugs)
Version: unspecified
Hardware: Other Linux
: P1 minor
Assignee: Owner of all unassigned bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-29 08:23 CDT by jfriedl
Modified: 2010-09-29 08:23 CDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jfriedl 2010-09-29 08:23:44 CDT
first StatisticsManager::process() works fine but if the system time is adjusted and the new system time differs from the old system time with a wide range then the poll routine is never called (f.i. the new system time is set to a year later).

Because of this I added following bugfix to StatisticsManager::process() 

--- resiprocate-1.5/resip/stack/StatisticsManager.cxx.org	2010-07-13 14:27:41.000000000 +0200
+++ resiprocate-1.5/resip/stack/StatisticsManager.cxx	2010-07-13 14:26:48.000000000 +0200
@@ -62,7 +62,14 @@
    if (Timer::getTimeMs() >= mNextPoll)
    {
       poll();
-      mNextPoll += mInterval;
+	  mNextPoll += mInterval;
+   
+	  // BugFix 20100713 TimeUpdate on embedded destination
+	  if (Timer::getTimeMs() >= mNextPoll + (10*mInterval))
+	  {
+		  mNextPoll = (Timer::getTimeMs() + mInterval);
+	  }
+   
    }
 }

It sets mNextPoll to the actual time-value if it differs more then 10 mInterval

It will be the same in the resiprocate-1.6

Probably this should be done for setting a year ealier too.