[PATCH spice-server 1/4] spice_timer_queue: don't call timers repeatedly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



For channels that don't run as part of the main loop, we use
spice_timer_queue, while for the other channels we use
qemu timers support. The callbacks for setting timers are supplied to
red_channel via SpiceCoreInterface, and their behavior should be
consistent. qemu timers are called only once per each call to
timer_start. This patch assigns the same behaviour to spice_timer_queue.
---
 server/spice_timer_queue.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/server/spice_timer_queue.c b/server/spice_timer_queue.c
index 833ab1d..8f6e9c8 100644
--- a/server/spice_timer_queue.c
+++ b/server/spice_timer_queue.c
@@ -261,9 +261,7 @@ void spice_timer_queue_cb(void)
             break;
         } else {
             timer->func(timer->opaque);
-            if (timer->is_active) {
-                _spice_timer_set(timer, timer->ms, now_ms);
-            }
+            spice_timer_cancel(timer);
         }
     }
 }
-- 
1.8.1.4

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]