2007-12-27 Dan Williams <dcbw@redhat.com>
* src/nm-device-interface.c src/nm-device-interface.h - (nm_device_interface_error_quark, nm_device_interface_error_get_type): normalize and expand errors - (nm_device_interface_init): register errors so they can be marshalled through dbus-glib - (nm_device_interface_activate): ensure that failure of activation returns an error * src/nm-device.c src/nm-device.h - (device_activation_precheck): implementations of check_connection() now take a GError and must fill it in if the check fails. Return more descriptive error if the requested connection is already activating - (nm_device_activate): actually try to return descriptive errors on failures * src/nm-device-802-11-wireless.c src/nm-device-802-3-ethernet.c src/nm-serial-device.c src/nm-gsm-device.c - (real_check_connection): return more descriptive errors on failure * src/NetworkManagerPolicy.c - (nm_policy_device_change_check): print activation errors in the logs * src/nm-manager.c - (nm_manager_error_quark, nm_manager_error_get_type, nm_manager_class_init): new errors - (nm_manager_activate_device): handle errors - (nm_manager_error_new): removed - (wait_for_connection_expired, connection_added_default_handler, impl_manager_activate_device): better error handling git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3197 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
@@ -367,8 +367,24 @@ nm_policy_device_change_check (gpointer user_data)
|
||||
if (old_dev)
|
||||
nm_device_interface_deactivate (NM_DEVICE_INTERFACE (old_dev));
|
||||
|
||||
if (new_dev)
|
||||
nm_manager_activate_device (policy->manager, new_dev, connection, specific_object, FALSE);
|
||||
if (new_dev) {
|
||||
GError *error = NULL;
|
||||
gboolean success;
|
||||
|
||||
success = nm_manager_activate_device (policy->manager,
|
||||
new_dev,
|
||||
connection,
|
||||
specific_object,
|
||||
FALSE,
|
||||
&error);
|
||||
if (!success) {
|
||||
nm_warning ("Failed to automatically activate device %s: (%d) %s",
|
||||
nm_device_get_iface (new_dev),
|
||||
error->code,
|
||||
error->message);
|
||||
g_error_free (error);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
out:
|
||||
|
Reference in New Issue
Block a user