Author: titmuss
Date: Thu Jul  3 09:37:52 2008
New Revision: 2658

URL: http://svn.slimdevices.com?rev=2658&root=Jive&view=rev
Log:
Bug: N/A
Description:
Fix a race condition that could cause timers to be cancelled wrongly. This may 
be a cause of some connection issues (where the 
connection item stays blue) and the stopped clock (bug 8081).


Modified:
    7.1/trunk/squeezeplay/src/squeezeplay/src/ui/jive_timer.c

Modified: 7.1/trunk/squeezeplay/src/squeezeplay/src/ui/jive_timer.c
URL: 
http://svn.slimdevices.com/7.1/trunk/squeezeplay/src/squeezeplay/src/ui/jive_timer.c?rev=2658&root=Jive&r1=2657&r2=2658&view=diff
==============================================================================
--- 7.1/trunk/squeezeplay/src/squeezeplay/src/ui/jive_timer.c (original)
+++ 7.1/trunk/squeezeplay/src/squeezeplay/src/ui/jive_timer.c Thu Jul  3 
09:37:52 2008
@@ -33,7 +33,13 @@
        data->busy++;
 
        if (data->once) {
-               return 0;
+               /* Changing interval is prone to race conditions in the
+                * SDL_ThreadedTimerCheck (see the FIXME). Don't rely on
+                * the timer being deleted if we return 0, instead change
+                * this timer to inifinity. We remove it later in the
+                * callback.
+                */
+               return INT_MAX;
        }
        else {
                return interval;

_______________________________________________
Jive-checkins mailing list
[email protected]
http://lists.slimdevices.com/cgi-bin/mailman/listinfo/jive-checkins

Reply via email to