core: remove dead code

This commit is contained in:
Dan Williams 2009-04-29 13:21:04 -04:00
parent 20c662e350
commit c955994b4f
3 changed files with 2 additions and 36 deletions

View file

@ -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

View file

@ -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);

View file

@ -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);
}
}