summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRui Matos <tiagomatos@gmail.com>2017-08-29 18:00:54 +0200
committerRui Matos <tiagomatos@gmail.com>2017-08-29 19:26:58 +0200
commit2556fd5e2c177010bf4871753f4476e4f80193f0 (patch)
tree3256dbf7c6932001e6783cdd94256d4b6a69c896
parent94045b84182304dc5c596829c17ea856b1c1bb07 (diff)
downloadgnome-control-center-2556fd5e2c177010bf4871753f4476e4f80193f0.tar.gz
sharing: Make use of the cancellable for async hostname calls
We have it initialized and disposed and the async calls already handle being cancelled. We just forgot to actually use it. https://bugzilla.gnome.org/show_bug.cgi?id=786984
-rw-r--r--panels/sharing/cc-sharing-panel.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/panels/sharing/cc-sharing-panel.c b/panels/sharing/cc-sharing-panel.c
index a557ad4a3..5add11540 100644
--- a/panels/sharing/cc-sharing-panel.c
+++ b/panels/sharing/cc-sharing-panel.c
@@ -786,7 +786,7 @@ cc_sharing_panel_bus_ready (GObject *object,
(GVariantType*)"(s)",
G_DBUS_CALL_FLAGS_NONE,
-1,
- NULL,
+ data->panel->priv->hostname_cancellable,
(GAsyncReadyCallback) cc_sharing_panel_get_host_name_fqdn_done,
data);
}
@@ -824,7 +824,8 @@ cc_sharing_panel_setup_label_with_hostname (CcSharingPanel *self,
get_hostname_data = g_new (GetHostNameData, 1);
get_hostname_data->panel = self;
get_hostname_data->label = label;
- g_bus_get (G_BUS_TYPE_SYSTEM, NULL,
+ g_bus_get (G_BUS_TYPE_SYSTEM,
+ self->priv->hostname_cancellable,
(GAsyncReadyCallback) cc_sharing_panel_bus_ready,
get_hostname_data);
}