[Spice-devel] [PATCH 07/10] server/tests: fix timer reset to allow setting next call during callback

Alon Levy alevy at redhat.com
Sat Jan 8 06:23:25 PST 2011


---
 server/tests/basic_event_loop.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/server/tests/basic_event_loop.c b/server/tests/basic_event_loop.c
index a50a916..99c086c 100644
--- a/server/tests/basic_event_loop.c
+++ b/server/tests/basic_event_loop.c
@@ -277,8 +277,8 @@ void timeout_timers()
         if (next->ms && left.tv_usec == 0 && left.tv_sec == 0) {
             count++;
             DPRINTF(1, "calling timer");
-            next->func(next->opaque);
             next->ms = 0;
+            next->func(next->opaque);
         }
         next = (SpiceTimer*)ring_next(&timers, &next->link);
     }
-- 
1.7.3.4



More information about the Spice-devel mailing list