Blame SOURCES/0016-spice_timer_queue-don-t-call-timers-repeatedly.patch

20333d
From cc477ab18f925465d5ea33664128a2e29b3afcb2 Mon Sep 17 00:00:00 2001
20333d
From: Yonit Halperin <yhalperi@redhat.com>
20333d
Date: Tue, 13 Aug 2013 15:40:16 -0400
20333d
Subject: [PATCH] spice_timer_queue: don't call timers repeatedly
20333d
20333d
For channels that don't run as part of the main loop, we use
20333d
spice_timer_queue, while for the other channels we use
20333d
qemu timers support. The callbacks for setting timers are supplied to
20333d
red_channel via SpiceCoreInterface, and their behavior should be
20333d
consistent. qemu timers are called only once per each call to
20333d
timer_start. This patch assigns the same behaviour to spice_timer_queue.
20333d
20333d
https://bugzilla.redhat.com/show_bug.cgi?id=1016790
20333d
(cherry picked from commit c1c08c289883455f025836f14eda7bfd86442ed7)
20333d
---
20333d
 server/spice_timer_queue.c | 4 +---
20333d
 1 file changed, 1 insertion(+), 3 deletions(-)
20333d
20333d
diff --git a/server/spice_timer_queue.c b/server/spice_timer_queue.c
20333d
index 833ab1d..8f6e9c8 100644
20333d
--- a/server/spice_timer_queue.c
20333d
+++ b/server/spice_timer_queue.c
20333d
@@ -261,9 +261,7 @@ void spice_timer_queue_cb(void)
20333d
             break;
20333d
         } else {
20333d
             timer->func(timer->opaque);
20333d
-            if (timer->is_active) {
20333d
-                _spice_timer_set(timer, timer->ms, now_ms);
20333d
-            }
20333d
+            spice_timer_cancel(timer);
20333d
         }
20333d
     }
20333d
 }