From bcf3b102841305a4597aebf5bc8eeb7de7c3d543 Mon Sep 17 00:00:00 2001 From: Andrew Zaborowski Date: Thu, 11 Jan 2018 13:14:39 +0100 Subject: [PATCH] iwd: Initialize priv->scanning when DBus interface appears --- src/devices/wifi/nm-device-iwd.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/devices/wifi/nm-device-iwd.c b/src/devices/wifi/nm-device-iwd.c index 5bc9d09878..48d87e616b 100644 --- a/src/devices/wifi/nm-device-iwd.c +++ b/src/devices/wifi/nm-device-iwd.c @@ -1733,6 +1733,7 @@ nm_device_iwd_set_dbus_object (NMDeviceIwd *self, GDBusObject *object) { NMDeviceIwdPrivate *priv = NM_DEVICE_IWD_GET_PRIVATE (self); GDBusInterface *interface; + gs_unref_variant GVariant *value = NULL; if (!nm_g_object_ref_set ((GObject **) &priv->dbus_obj, (GObject *) object)) return; @@ -1759,6 +1760,9 @@ nm_device_iwd_set_dbus_object (NMDeviceIwd *self, GDBusObject *object) interface = g_dbus_object_get_interface (object, NM_IWD_DEVICE_INTERFACE); priv->dbus_proxy = G_DBUS_PROXY (interface); + value = g_dbus_proxy_get_cached_property (priv->dbus_proxy, "Scanning"); + priv->scanning = g_variant_get_boolean (value); + g_signal_connect (priv->dbus_proxy, "g-properties-changed", G_CALLBACK (properties_changed), self);