diff options
Diffstat (limited to 'src/devices/wifi/nm-iwd-manager.c')
-rw-r--r-- | src/devices/wifi/nm-iwd-manager.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/src/devices/wifi/nm-iwd-manager.c b/src/devices/wifi/nm-iwd-manager.c index 21f0a75559..f9d0076a73 100644 --- a/src/devices/wifi/nm-iwd-manager.c +++ b/src/devices/wifi/nm-iwd-manager.c @@ -99,7 +99,6 @@ psk_agent_dbus_method_cb (GDBusConnection *connection, gs_unref_variant GVariant *value = NULL; gint ifindex; NMDevice *device; - const gchar *psk; /* Be paranoid and check the sender address */ if (!nm_streq0 (g_dbus_object_manager_client_get_name_owner (omc), sender)) @@ -120,8 +119,8 @@ psk_agent_dbus_method_cb (GDBusConnection *connection, } device_obj = g_dbus_object_manager_get_interface (priv->object_manager, - device_path, - NM_IWD_DEVICE_INTERFACE); + device_path, + NM_IWD_DEVICE_INTERFACE); g_variant_unref (value); value = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (device_obj), "Name"); ifname = g_variant_get_string (value, NULL); @@ -146,16 +145,10 @@ psk_agent_dbus_method_cb (GDBusConnection *connection, goto return_error; } - psk = nm_device_iwd_agent_psk_query (NM_DEVICE_IWD (device)); - if (!psk) { - _LOGW ("Device %s had no PSK for the IWD Agent", ifname); - goto return_error; - } + if (nm_device_iwd_agent_psk_query (NM_DEVICE_IWD (device), invocation)) + return; - _LOGI ("Sending the PSK to the IWD Agent for device %s", ifname); - g_dbus_method_invocation_return_value (invocation, - g_variant_new ("(s)", psk)); - return; + _LOGE ("Device %s did not handle the IWD Agent request", ifname); return_error: /* IWD doesn't look at the specific error */ |