diff options
author | Giovanni Campagna <gcampagna@src.gnome.org> | 2014-07-29 14:46:34 +0200 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2014-07-31 20:51:44 -0500 |
commit | 07046462f788a8df1a2a2d739ce4cebbdbc84cb6 (patch) | |
tree | 94384e481840a5ce0b1c472088820851432d1c44 /libnm-glib/nm-client.c | |
parent | 833ea6944d5abeb05d9fd36cf5176fd6ce1bde7a (diff) |
libnm-glib: disconnect the connectivity check cancellable signal after the call has ended (bgo #733915)
We cannot rely on connectivity data freeing to disconnect the signal,
because the simple async result might be kept alive by external
code (for example the language runtime for JS), but we must not
call dbus_g_proxy_cancel_call() if that cancellable is cancelled or
reused afterwards.
https://bugzilla.gnome.org/show_bug.cgi?id=733915
Diffstat (limited to 'libnm-glib/nm-client.c')
-rw-r--r-- | libnm-glib/nm-client.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libnm-glib/nm-client.c b/libnm-glib/nm-client.c index 819baa7dd..c020f9ffd 100644 --- a/libnm-glib/nm-client.c +++ b/libnm-glib/nm-client.c @@ -1481,6 +1481,11 @@ check_connectivity_cb (DBusGProxy *proxy, CheckConnectivityData *ccd = g_simple_async_result_get_op_res_gpointer (simple); GError *error = NULL; + if (ccd->cancellable) { + g_signal_handler_disconnect (ccd->cancellable, ccd->cancelled_id); + ccd->cancelled_id = 0; + } + if (!dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_UINT, &ccd->connectivity, G_TYPE_INVALID)) |