2004-11-16 Dan Williams <dcbw@redhat.com>

* src/NetworkManagerDevice.[ch]
		- (nm_device_clear_activation_fail): new function

	* src/NetworkManagerPolicy.c
		- (nm_state_modification_monitor): clear the activation_failed flag on devices
			when we've dealt with the failure so the user doesn't get failure-dialog-spammed


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@317 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
Dan Williams
2004-11-16 16:34:14 +00:00
parent 687912bc96
commit 956ad6fbb8
4 changed files with 33 additions and 127 deletions

View File

@@ -350,23 +350,28 @@ gboolean nm_state_modification_monitor (gpointer user_data)
}
else if (data->active_device && nm_device_did_activation_fail (data->active_device))
{
NMAccessPoint *ap = NULL;
nm_device_clear_activation_fail (data->active_device);
nm_dbus_signal_device_status_change (data->dbus_connection, data->active_device, DEVICE_ACTIVATION_FAILED);
if (nm_device_is_wireless (data->active_device))
{
ap = nm_device_get_best_ap (data->active_device);
/* Add the AP to the invalid list and force a best ap update */
nm_ap_list_append_ap (data->invalid_ap_list, ap);
nm_ap_unref (ap);
nm_device_update_best_ap (data->active_device);
NMAccessPoint *ap = nm_device_get_best_ap (data->active_device);
if (ap)
{
/* Add the AP to the invalid list and force a best ap update */
nm_ap_list_append_ap (data->invalid_ap_list, ap);
nm_device_update_best_ap (data->active_device);
/* Unref once because the list takes ownership, and unref a second time because
* nm_device_get_best_ap() refs it before returning.
*/
nm_ap_unref (ap);
nm_ap_unref (ap);
}
syslog (LOG_INFO, "nm_state_modification_monitor() failed to activate device %s (%s)", nm_device_get_iface (data->active_device), ap ? nm_ap_get_essid (ap) : "(none)");
}
if (ap && nm_ap_get_essid (ap))
syslog (LOG_INFO, "nm_state_modification_monitor() failed to activate device %s (%s)", nm_device_get_iface (data->active_device), nm_ap_get_essid (ap));
else
syslog (LOG_INFO, "nm_state_modification_monitor() failed to activate device %s", nm_device_get_iface (data->active_device));
nm_data_mark_state_changed (data);
if (ap)
nm_ap_unref (ap);
}
/* Clear the starting up flag, so we will now take over and have our way with