[Orca-checkins] r376 - trunk/orca/data_gatherers/orcallator

Blair Zajac blair at orcaware.com
Sun Jul 18 12:58:47 PDT 2004


Author: blair
Date: Sun Jul 18 12:48:01 2004
New Revision: 376

Modified:
   trunk/orca/data_gatherers/orcallator/orcallator.se
Log:
* data_gatherers/orcallator/orcallator.se
  (orca_sleep_till)
    Fix a bug where if the current Unix epoch time in seconds is
    greater than the time to sleep to (because the scheduler puts
    orcallator.se to sleep for too long), the function would calculate
    a negative time to sleep which when cast to an unsigned long
    becomes a very large value.  Change the variable holding the
    amount of time to sleep from an unsigned long to a signed long.
    Patch from John Garner <jcgarner at douglas.co.us>.


Modified: trunk/orca/data_gatherers/orcallator/orcallator.se
==============================================================================
--- trunk/orca/data_gatherers/orcallator/orcallator.se	(original)
+++ trunk/orca/data_gatherers/orcallator/orcallator.se	Sun Jul 18 12:48:01 2004
@@ -1204,7 +1204,7 @@
 orca_sleep_till(long sleep_till)
 {
   timeval_t now[1];
-  ulong     time_to_sleep;
+  long      time_to_sleep;
 
   gettimeofday(now, 0);
   time_to_sleep = sleep_till - now[0].tv_sec;



More information about the Orca-checkins mailing list