From 8435aa8b31964ac99b51a227f79dccf7ae135bf3 Mon Sep 17 00:00:00 2001 From: Andrew Zaborowski Date: Fri, 2 Mar 2018 13:56:22 +0100 Subject: [PATCH] iwd: fix device-added signal handler signature This bug was not causing a crash for me because of the !IS_NM_DEVICE_IWD check and because my glib version probably had the assertion within NM_IWD_MANAGER_GET_PRIVATE disabled. While there, change the g_signal_connect line to use the macro for the signal name. --- src/devices/wifi/nm-iwd-manager.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/devices/wifi/nm-iwd-manager.c b/src/devices/wifi/nm-iwd-manager.c index f9d0076a7..0007b0fff 100644 --- a/src/devices/wifi/nm-iwd-manager.c +++ b/src/devices/wifi/nm-iwd-manager.c @@ -481,7 +481,7 @@ name_owner_changed (GObject *object, GParamSpec *pspec, gpointer user_data) } static void -device_added (NMDevice *device, gpointer user_data) +device_added (NMManager *manager, NMDevice *device, gpointer user_data) { NMIwdManager *self = user_data; NMIwdManagerPrivate *priv = NM_IWD_MANAGER_GET_PRIVATE (self); @@ -641,7 +641,7 @@ nm_iwd_manager_init (NMIwdManager *self) NMIwdManagerPrivate *priv = NM_IWD_MANAGER_GET_PRIVATE (self); priv->nm_manager = g_object_ref (nm_manager_get ()); - g_signal_connect (priv->nm_manager, "device-added", + g_signal_connect (priv->nm_manager, NM_MANAGER_DEVICE_ADDED, G_CALLBACK (device_added), self); priv->cancellable = g_cancellable_new ();