summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2013-09-18 20:08:42 +0200
committerThomas Haller <thaller@redhat.com>2013-09-25 21:01:04 +0200
commite45fdcfd2dd3e2e9a6413ac2eaa8ef2b776865d3 (patch)
treeca6c186ab339a47c38c13f989f1342652a7a9626
parent4be056f5046e4531baae51f381222759e4e461b8 (diff)
downloadNetworkManager-e45fdcfd2dd3e2e9a6413ac2eaa8ef2b776865d3.tar.gz
bluez: get rid of connected_id for disconnecting from signal
Signed-off-by: Thomas Haller <thaller@redhat.com>
-rw-r--r--src/devices/nm-device-bt.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/devices/nm-device-bt.c b/src/devices/nm-device-bt.c
index 1350a6ebdc..6a066c0eac 100644
--- a/src/devices/nm-device-bt.c
+++ b/src/devices/nm-device-bt.c
@@ -69,7 +69,6 @@ typedef struct {
guint32 capabilities;
gboolean connected;
- guint32 connected_id;
gboolean have_iface;
DBusGProxy *type_proxy;
@@ -1138,9 +1137,9 @@ constructed (GObject *object)
priv->bdaddr = nm_utils_hwaddr_ntoa (my_hwaddr, ARPHRD_ETHER);
/* Watch for BT device property changes */
- priv->connected_id = g_signal_connect (priv->bt_device, "notify::connected",
- G_CALLBACK (bluez_connected_changed),
- object);
+ g_signal_connect (priv->bt_device, "notify::" NM_BLUEZ_DEVICE_CONNECTED,
+ G_CALLBACK (bluez_connected_changed),
+ object);
}
static void
@@ -1200,10 +1199,9 @@ dispose (GObject *object)
priv->timeout_id = 0;
}
- if (priv->connected_id) {
- g_source_remove (priv->connected_id);
- priv->connected_id = 0;
- }
+ g_signal_handlers_disconnect_by_func (priv->bt_device,
+ G_CALLBACK (bluez_connected_changed),
+ object);
if (priv->dbus_mgr && priv->mm_watch_id) {
g_signal_handler_disconnect (priv->dbus_mgr, priv->mm_watch_id);