2006-03-03 Dan Williams <dcbw@redhat.com>
Fix a crash if an "Other wireless network" was chosen, failed, then chosen again from the applet's menu. If the other network wasn't noticed in a scan, it wouldn't have any capabilities, but would still be listed because the user forced the network. To fix this, we set sensible capabilities on the forced network, which will get overwritten with the correct ones if the network shows up later in a scan. * src/nm-ap-security.h - Add a new "get_default_capabilities_func" member to the NMAPSecurity class * src/nm-ap-security.c - (nm_ap_security_get_default_capabilities): new function * src/nm-ap-security.c src/nm-ap-security-wep.c src/nm-ap-security-wpa-psk.c src/nm-ap-security-wpa-eap.c - Implement get_default_capabilities_func() for all, which uses the information contained in a specific NMAPSecurity object to determine default AP capabilites necessary to support that object As a secondary measure, we now prune artificial access points that fail to be activated right away. The thing failed, and we have no scan data for it, so it's pretty much useless since security information is only saved in the applets when a connection is successful. * src/NetworkManagerAPList.c - (nm_ap_list_merge_scanned_ap): mark any ap noticed in a scan not artificial. If we see it, it's no longer a figment of the user's imagination :) * src/NetworkManagerPolicy.c - (nm_policy_activation_failed): send along the failed AP if we have it * src/nm-device-802-11-wireless.c - (real_activation_failure_handler): remove artificial APs from the device list, because activation failed git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1542 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
@@ -113,6 +113,7 @@ static gboolean nm_policy_activation_failed (NMActRequest *req)
|
||||
{
|
||||
NMDevice * dev = NULL;
|
||||
NMData * data = NULL;
|
||||
NMAccessPoint *ap = NULL;
|
||||
|
||||
g_return_val_if_fail (req != NULL, FALSE);
|
||||
|
||||
@@ -124,8 +125,11 @@ static gboolean nm_policy_activation_failed (NMActRequest *req)
|
||||
|
||||
nm_device_activation_failure_handler (dev, req);
|
||||
|
||||
if (nm_device_is_802_11_wireless (dev))
|
||||
ap = nm_act_request_get_ap (req);
|
||||
|
||||
nm_info ("Activation (%s) failed.", nm_device_get_iface (dev));
|
||||
nm_dbus_schedule_device_status_change_signal (data, dev, NULL, DEVICE_ACTIVATION_FAILED);
|
||||
nm_dbus_schedule_device_status_change_signal (data, dev, ap, DEVICE_ACTIVATION_FAILED);
|
||||
|
||||
nm_device_deactivate (dev);
|
||||
nm_schedule_state_change_signal_broadcast (data);
|
||||
|
Reference in New Issue
Block a user