bluez: get rid of connected_id for disconnecting from signal
Signed-off-by: Thomas Haller <thaller@redhat.com>
This commit is contained in:
@@ -69,7 +69,6 @@ typedef struct {
|
|||||||
guint32 capabilities;
|
guint32 capabilities;
|
||||||
|
|
||||||
gboolean connected;
|
gboolean connected;
|
||||||
guint32 connected_id;
|
|
||||||
gboolean have_iface;
|
gboolean have_iface;
|
||||||
|
|
||||||
DBusGProxy *type_proxy;
|
DBusGProxy *type_proxy;
|
||||||
@@ -1138,7 +1137,7 @@ constructed (GObject *object)
|
|||||||
priv->bdaddr = nm_utils_hwaddr_ntoa (my_hwaddr, ARPHRD_ETHER);
|
priv->bdaddr = nm_utils_hwaddr_ntoa (my_hwaddr, ARPHRD_ETHER);
|
||||||
|
|
||||||
/* Watch for BT device property changes */
|
/* Watch for BT device property changes */
|
||||||
priv->connected_id = g_signal_connect (priv->bt_device, "notify::connected",
|
g_signal_connect (priv->bt_device, "notify::" NM_BLUEZ_DEVICE_CONNECTED,
|
||||||
G_CALLBACK (bluez_connected_changed),
|
G_CALLBACK (bluez_connected_changed),
|
||||||
object);
|
object);
|
||||||
}
|
}
|
||||||
@@ -1200,10 +1199,9 @@ dispose (GObject *object)
|
|||||||
priv->timeout_id = 0;
|
priv->timeout_id = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (priv->connected_id) {
|
g_signal_handlers_disconnect_by_func (priv->bt_device,
|
||||||
g_source_remove (priv->connected_id);
|
G_CALLBACK (bluez_connected_changed),
|
||||||
priv->connected_id = 0;
|
object);
|
||||||
}
|
|
||||||
|
|
||||||
if (priv->dbus_mgr && priv->mm_watch_id) {
|
if (priv->dbus_mgr && priv->mm_watch_id) {
|
||||||
g_signal_handler_disconnect (priv->dbus_mgr, priv->mm_watch_id);
|
g_signal_handler_disconnect (priv->dbus_mgr, priv->mm_watch_id);
|
||||||
|
Reference in New Issue
Block a user