summaryrefslogtreecommitdiff
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:31:24 +0100
commitcab17ff8e0f4935cd3a4b8564edd1ed765987d9f (patch)
tree6f80c53e6fbbc033f429d8319bff47717721a8ee
parent6aa9e52bd88670f10861e402a8c61c282a1e97c2 (diff)
downloadNetworkManager-cab17ff8e0f4935cd3a4b8564edd1ed765987d9f.tar.gz
supplicant: clarify ready_count usage
-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