[Spice-devel] [spice-gtk 3/5] session: don't track open_host_idle source id

Marc-André Lureau marcandre.lureau at gmail.com
Wed Jan 22 10:26:49 PST 2014


From: Marc-André Lureau <marcandre.lureau at redhat.com>

In all cases, when the coroutine is resumed, the idle source has been
removed. Doing it a second time might result in the wrong source being
removed or an invalid source warning.
---
 gtk/spice-session.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/gtk/spice-session.c b/gtk/spice-session.c
index bcbba27..9e6c154 100644
--- a/gtk/spice-session.c
+++ b/gtk/spice-session.c
@@ -1825,10 +1825,9 @@ GSocketConnection* spice_session_channel_open_host(SpiceSession *session, SpiceC
         g_timeout_add_seconds(SOCKET_TIMEOUT, connect_timeout, &open_host);
 #endif
 
-    guint id = g_idle_add(open_host_idle_cb, &open_host);
+    g_idle_add(open_host_idle_cb, &open_host);
     /* switch to main loop and wait for connection */
     coroutine_yield(NULL);
-    g_source_remove(id);
 
 #if !GLIB_CHECK_VERSION(2,26,0)
     if (open_host.timeout_id == 0)
-- 
1.8.4.2



More information about the Spice-devel mailing list