summaryrefslogtreecommitdiff
path: root/src/supplicant/nm-supplicant-interface.c
diff options
context:
space:
mode:
authorBeniamino Galvani <bgalvani@redhat.com>2019-02-25 08:35:12 +0100
committerBeniamino Galvani <bgalvani@redhat.com>2019-02-26 18:35:07 +0100
commit7cff3136f5c79589a79bb4e4976a64c6f78b498b (patch)
tree84f0206f14175935fc994906bbbfee49c48e855f /src/supplicant/nm-supplicant-interface.c
parent4c8ff6f2207cb49d8770c46bac49afc8214da86e (diff)
downloadNetworkManager-7cff3136f5c79589a79bb4e4976a64c6f78b498b.tar.gz
supplicant: clarify ready_count usage
(cherry picked from commit cab17ff8e0f4935cd3a4b8564edd1ed765987d9f)
Diffstat (limited to 'src/supplicant/nm-supplicant-interface.c')
-rw-r--r--src/supplicant/nm-supplicant-interface.c28
1 files changed, 15 insertions, 13 deletions
diff --git a/src/supplicant/nm-supplicant-interface.c b/src/supplicant/nm-supplicant-interface.c
index 82354df01b..16c247ccab 100644
--- a/src/supplicant/nm-supplicant-interface.c
+++ b/src/supplicant/nm-supplicant-interface.c
@@ -1638,6 +1638,21 @@ on_iface_proxy_acquired (GDBusProxy *proxy, GAsyncResult *result, gpointer user_
NULL,
NULL);
+ /* 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)",
+ "/fff",
+ "foobar",
+ "foobar"),
+ G_DBUS_CALL_FLAGS_NONE,
+ -1,
+ priv->init_cancellable,
+ (GAsyncReadyCallback) iface_check_netreply_cb,
+ self);
+
/* Initialize global PMF setting to 'optional' */
priv->ready_count++;
g_dbus_proxy_call (priv->iface_proxy,
@@ -1652,19 +1667,6 @@ on_iface_proxy_acquired (GDBusProxy *proxy, GAsyncResult *result, gpointer user_
(GAsyncReadyCallback) iface_set_pmf_cb,
self);
- /* Check whether NetworkReply and AP mode are supported */
- g_dbus_proxy_call (priv->iface_proxy,
- "NetworkReply",
- g_variant_new ("(oss)",
- "/fff",
- "foobar",
- "foobar"),
- G_DBUS_CALL_FLAGS_NONE,
- -1,
- priv->init_cancellable,
- (GAsyncReadyCallback) iface_check_netreply_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