[Spice-devel] [spice-server 1/4] test-loop: Improve basic_event_loop base_{timer, watch}_add

Christophe Fergeau cfergeau at redhat.com
Thu Jan 21 05:14:56 PST 2016


They call the functions provided by event_loop_core, but with a NULL
SpiceCoreInterfaceInternal parameter. It makes more sense to pass
event_loop_core rather than NULL.
This will allow to pass the GMainContext to be used through
SpiceCoreInterfaceInternal rather than through a template parameter.
---
 server/tests/basic_event_loop.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/server/tests/basic_event_loop.c b/server/tests/basic_event_loop.c
index 997d251..81e70b7 100644
--- a/server/tests/basic_event_loop.c
+++ b/server/tests/basic_event_loop.c
@@ -76,12 +76,12 @@ static void ignore_sigpipe(void)
 
 static SpiceTimer* base_timer_add(SpiceTimerFunc func, void *opaque)
 {
-    return event_loop_core.timer_add(NULL, func, opaque);
+    return event_loop_core.timer_add(&event_loop_core, func, opaque);
 }
 
 static SpiceWatch *base_watch_add(int fd, int event_mask, SpiceWatchFunc func, void *opaque)
 {
-    return event_loop_core.watch_add(NULL, fd, event_mask, func, opaque);
+    return event_loop_core.watch_add(&event_loop_core, fd, event_mask, func, opaque);
 }
 
 static SpiceCoreInterface core = {
-- 
2.5.0



More information about the Spice-devel mailing list