From c955994b4faaae27affe01ae3588c89e48628eee Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Wed, 29 Apr 2009 13:21:04 -0400 Subject: [PATCH] core: remove dead code --- src/NetworkManagerAP.c | 27 +-------------------------- src/NetworkManagerAP.h | 3 --- src/nm-device-wifi.c | 8 +------- 3 files changed, 2 insertions(+), 36 deletions(-) diff --git a/src/NetworkManagerAP.c b/src/NetworkManagerAP.c index a9da21f562..9b95924144 100644 --- a/src/NetworkManagerAP.c +++ b/src/NetworkManagerAP.c @@ -53,7 +53,6 @@ typedef struct guint32 rsn_flags; /* RSN (WPA2) -related flags */ /* Non-scanned attributes */ - gboolean invalid; gboolean fake; /* Whether or not the AP is from a scan */ gboolean broadcast; /* Whether or not the AP is broadcasting (hidden) */ gboolean user_created; /* Whether or not the AP was created @@ -702,8 +701,7 @@ nm_ap_print_self (NMAccessPoint *ap, priv = NM_AP_GET_PRIVATE (ap); nm_info ("%s'%s' (%p) stamp=%ld flags=0x%X wpa-flags=0x%X rsn-flags=0x%x " - "bssid=" MAC_FMT " strength=%d freq=%d rate=%d inval=%d " - "mode=%d seen=%ld", + "bssid=" MAC_FMT " strength=%d freq=%d rate=%d mode=%d seen=%ld", prefix, priv->ssid ? nm_utils_escape_ssid (priv->ssid->data, priv->ssid->len) : "(none)", ap, @@ -715,7 +713,6 @@ nm_ap_print_self (NMAccessPoint *ap, priv->strength, priv->freq, priv->max_bitrate, - priv->invalid, priv->mode, priv->last_seen); } @@ -1040,28 +1037,6 @@ nm_ap_set_max_bitrate (NMAccessPoint *ap, guint32 bitrate) } } - -/* - * Get/set functions for "invalid" access points, ie ones - * for which a user explicitly does not wish to connect to - * (by cancelling requests for WEP key, for example) - * - */ -gboolean nm_ap_get_invalid (const NMAccessPoint *ap) -{ - g_return_val_if_fail (NM_IS_AP (ap), TRUE); - - return NM_AP_GET_PRIVATE (ap)->invalid; -} - -void nm_ap_set_invalid (NMAccessPoint *ap, gboolean invalid) -{ - g_return_if_fail (NM_IS_AP (ap)); - - NM_AP_GET_PRIVATE (ap)->invalid = invalid; -} - - /* * Get/Set functions to indicate that an access point is 'fake', ie whether * or not it was created from scan results diff --git a/src/NetworkManagerAP.h b/src/NetworkManagerAP.h index 3f2bc617e0..edc9e56bfb 100644 --- a/src/NetworkManagerAP.h +++ b/src/NetworkManagerAP.h @@ -95,9 +95,6 @@ void nm_ap_set_freq (NMAccessPoint *ap, guint32 freq); guint32 nm_ap_get_max_bitrate (NMAccessPoint *ap); void nm_ap_set_max_bitrate (NMAccessPoint *ap, guint32 bitrate); -gboolean nm_ap_get_invalid (const NMAccessPoint *ap); -void nm_ap_set_invalid (NMAccessPoint *ap, gboolean invalid); - gboolean nm_ap_get_fake (const NMAccessPoint *ap); void nm_ap_set_fake (NMAccessPoint *ap, gboolean fake); diff --git a/src/nm-device-wifi.c b/src/nm-device-wifi.c index 63c2c9d8bd..6503dbfafd 100644 --- a/src/nm-device-wifi.c +++ b/src/nm-device-wifi.c @@ -2584,11 +2584,8 @@ handle_auth_or_fail (NMDeviceWifi *self, g_assert (ap); tries = GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (connection), WIRELESS_SECRETS_TRIES)); - if (tries > 3) { - /* Make the user try again explicitly */ - nm_ap_set_invalid (ap, TRUE); + if (tries > 3) return NM_ACT_STAGE_RETURN_FAILURE; - } nm_device_state_changed (NM_DEVICE (self), NM_DEVICE_STATE_NEED_AUTH, NM_DEVICE_STATE_REASON_NONE); @@ -3239,9 +3236,6 @@ activation_failure_handler (NMDevice *dev) access_point_removed (self, ap); priv->ap_list = g_slist_remove (priv->ap_list, ap); g_object_unref (ap); - } else { - /* Add the AP to the invalid list */ - nm_ap_set_invalid (ap, TRUE); } }