diff options
| author | Sebastien Bacher <seb128@ubuntu.com> | 2019-03-12 15:16:42 +0100 |
|---|---|---|
| committer | Sebastien Bacher <seb128@ubuntu.com> | 2019-03-12 15:16:42 +0100 |
| commit | cc4ab276f923ded9f415c1c2bf192994367ab0bb (patch) | |
| tree | ac3a7775665992b27d07eb44186d38ff961a8cd7 /src/supplicant/nm-supplicant-interface.c | |
| parent | bb1cf58350bb34463e9ffc5f96ac4f9b6bf46d28 (diff) | |
| parent | dd428301eb6f02542015121d7b08d9997f137e50 (diff) | |
Update upstream source from tag 'upstream/1.15.91'
Update to upstream version '1.15.91' with Debian dir 74de38245314cab529c6c94cd9d0b874ce0c2994
Diffstat (limited to 'src/supplicant/nm-supplicant-interface.c')
| -rw-r--r-- | src/supplicant/nm-supplicant-interface.c | 43 |
1 files changed, 22 insertions, 21 deletions
diff --git a/src/supplicant/nm-supplicant-interface.c b/src/supplicant/nm-supplicant-interface.c index c30adc58..f46689eb 100644 --- a/src/supplicant/nm-supplicant-interface.c +++ b/src/supplicant/nm-supplicant-interface.c @@ -25,7 +25,6 @@ #include "nm-supplicant-manager.h" #include <stdio.h> -#include <string.h> #include "NetworkManagerUtils.h" #include "nm-supplicant-config.h" @@ -729,9 +728,8 @@ iface_set_pmf_cb (GDBusProxy *proxy, GAsyncResult *result, gpointer user_data) self = NM_SUPPLICANT_INTERFACE (user_data); - /* This can fail if the supplicant doesn't support PMF */ if (error) - _LOGD ("failed to set Pmf=1: %s", error->message); + _LOGW ("failed to set Pmf=1: %s", error->message); iface_check_ready (self); } @@ -1452,7 +1450,7 @@ p2p_props_changed_cb (GDBusProxy *proxy, /* We already have the proxy, nothing to do. */ } else if (path && g_strcmp0 (path, "/") != 0) { if (priv->group_proxy != NULL) { - _LOGW ("P2P: Unexpected udpate of the group object path"); + _LOGW ("P2P: Unexpected update of the group object path"); priv->group_proxy_acquired = FALSE; _notify (self, PROP_P2P_GROUP_JOINED); _notify (self, PROP_P2P_GROUP_PATH); @@ -1548,7 +1546,7 @@ p2p_group_started (GDBusProxy *proxy, } } - /* Signal existance of the (new) interface. */ + /* Signal existence of the (new) interface. */ g_signal_emit (self, signals[GROUP_STARTED], 0, iface); g_object_unref (iface); } @@ -1639,21 +1637,9 @@ on_iface_proxy_acquired (GDBusProxy *proxy, GAsyncResult *result, gpointer user_ NULL, NULL); - /* Initialize global PMF setting to 'optional' */ - priv->ready_count++; - g_dbus_proxy_call (priv->iface_proxy, - DBUS_INTERFACE_PROPERTIES ".Set", - g_variant_new ("(ssv)", - WPAS_DBUS_IFACE_INTERFACE, - "Pmf", - g_variant_new_string ("1")), - G_DBUS_CALL_FLAGS_NONE, - -1, - priv->init_cancellable, - (GAsyncReadyCallback) iface_set_pmf_cb, - self); - - /* Check whether NetworkReply and AP mode are supported */ + /* Check whether NetworkReply and AP mode are supported. + * ready_count was initialized to 1 in interface_add_done(). + */ g_dbus_proxy_call (priv->iface_proxy, "NetworkReply", g_variant_new ("(oss)", @@ -1666,6 +1652,22 @@ on_iface_proxy_acquired (GDBusProxy *proxy, GAsyncResult *result, gpointer user_ (GAsyncReadyCallback) iface_check_netreply_cb, self); + if (priv->pmf_support == NM_SUPPLICANT_FEATURE_YES) { + /* Initialize global PMF setting to 'optional' */ + priv->ready_count++; + g_dbus_proxy_call (priv->iface_proxy, + DBUS_INTERFACE_PROPERTIES ".Set", + g_variant_new ("(ssv)", + WPAS_DBUS_IFACE_INTERFACE, + "Pmf", + g_variant_new_string ("1")), + G_DBUS_CALL_FLAGS_NONE, + -1, + priv->init_cancellable, + (GAsyncReadyCallback) iface_set_pmf_cb, + self); + } + if (priv->ap_support == NM_SUPPLICANT_FEATURE_UNKNOWN) { /* If the global supplicant capabilities property is not present, we can * fall back to checking whether the ProbeRequest method is supported. If @@ -2482,7 +2484,6 @@ nm_supplicant_interface_p2p_start_find (NMSupplicantInterface *self, priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self); - /* Find parameters */ g_variant_builder_init (&builder, G_VARIANT_TYPE_VARDICT); g_variant_builder_add (&builder, "{sv}", "Timeout", g_variant_new_int32 (timeout)); |