mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-06 02:40:17 +01:00
iwd: initialize priv->can_connect when DBus interface appears
Call state_changed with the initial Device.State property value to make sure can_connect and can_scan are up to date.
This commit is contained in:
parent
755d4e55c2
commit
eea06b8a8c
1 changed files with 6 additions and 1 deletions
|
|
@ -1835,7 +1835,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;
|
||||
GVariant *value;
|
||||
|
||||
if (!nm_g_object_ref_set ((GObject **) &priv->dbus_obj, (GObject *) object))
|
||||
return;
|
||||
|
|
@ -1864,8 +1864,13 @@ nm_device_iwd_set_dbus_object (NMDeviceIwd *self, GDBusObject *object)
|
|||
|
||||
value = g_dbus_proxy_get_cached_property (priv->dbus_proxy, "Scanning");
|
||||
priv->scanning = g_variant_get_boolean (value);
|
||||
g_variant_unref (value);
|
||||
priv->scan_requested = FALSE;
|
||||
|
||||
value = g_dbus_proxy_get_cached_property (priv->dbus_proxy, "State");
|
||||
state_changed (self, g_variant_get_string (value, NULL));
|
||||
g_variant_unref (value);
|
||||
|
||||
g_signal_connect (priv->dbus_proxy, "g-properties-changed",
|
||||
G_CALLBACK (properties_changed), self);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue