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

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

 



From: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx>

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

_______________________________________________
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]