diff options
author | Thomas Haller <thaller@redhat.com> | 2016-01-19 22:10:14 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2016-01-21 14:58:55 +0100 |
commit | 5d64da1da283f5718f06cbd2b7bd2e8d755d168e (patch) | |
tree | 494c799da7bf1180af7e02130fa3eda81400a0e4 | |
parent | a8165611a844514985f85767170b946edc0cfb65 (diff) | |
download | NetworkManager-5d64da1da283f5718f06cbd2b7bd2e8d755d168e.tar.gz |
supplicant: drop is_wireless argument from NMSupplicantInterface's interface_add()
-rw-r--r-- | src/supplicant-manager/nm-supplicant-interface.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/supplicant-manager/nm-supplicant-interface.c b/src/supplicant-manager/nm-supplicant-interface.c index 3630dfc9cf..d49cb4e7ee 100644 --- a/src/supplicant-manager/nm-supplicant-interface.c +++ b/src/supplicant-manager/nm-supplicant-interface.c @@ -380,7 +380,7 @@ parse_capabilities (NMSupplicantInterface *self, GVariant *capabilities) */ priv->max_scan_ssids = CLAMP (max_scan_ssids, 0, 5); nm_log_info (LOGD_SUPPLICANT, "(%s) supports %d scan SSIDs", - priv->dev, priv->max_scan_ssids); + priv->dev, priv->max_scan_ssids); } } } @@ -935,7 +935,7 @@ on_wpas_proxy_acquired (GDBusProxy *proxy, GAsyncResult *result, gpointer user_d } static void -interface_add (NMSupplicantInterface *self, gboolean is_wireless) +interface_add (NMSupplicantInterface *self) { NMSupplicantInterfacePrivate *priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self); @@ -944,8 +944,6 @@ interface_add (NMSupplicantInterface *self, gboolean is_wireless) nm_log_dbg (LOGD_SUPPLICANT, "(%s): adding interface to supplicant", priv->dev); - priv->is_wireless = is_wireless; - /* Move to starting to prevent double-calls of interface_add() */ set_state (self, NM_SUPPLICANT_INTERFACE_STATE_STARTING); @@ -969,14 +967,18 @@ void nm_supplicant_interface_set_supplicant_available (NMSupplicantInterface *self, gboolean available) { - NMSupplicantInterfacePrivate *priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self); + NMSupplicantInterfacePrivate *priv; + + g_return_if_fail (NM_IS_SUPPLICANT_INTERFACE (self)); + + priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self); if (available) { /* This can happen if the supplicant couldn't be activated but * for some reason was started after the activation failure. */ if (priv->state == NM_SUPPLICANT_INTERFACE_STATE_INIT) - interface_add (self, priv->is_wireless); + interface_add (self); } else { /* The supplicant stopped; so we must tear down the interface */ set_state (self, NM_SUPPLICANT_INTERFACE_STATE_DOWN); @@ -1435,12 +1437,12 @@ nm_supplicant_interface_new (const char *ifname, priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self); priv->dev = g_strdup (ifname); - priv->is_wireless = is_wireless; + priv->is_wireless = !!is_wireless; priv->fast_supported = fast_supported; priv->ap_support = ap_support; if (start_now) - interface_add (self, priv->is_wireless); + interface_add (self); return self; } |