2008-06-12 Dan Williams <dcbw@redhat.com>
Add a GError argument to nm_connection_verify() and nm_setting_verify(), and add error enums to each NMSetting subclass. Each NMSetting subclass now returns a descriptive GError when verification fails. git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3751 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
@@ -648,6 +648,7 @@ parse_ifcfg (const char *iface, NMDeviceType type)
|
||||
{
|
||||
shvarFile *file;
|
||||
NMConnection *connection;
|
||||
GError *error = NULL;
|
||||
|
||||
g_return_val_if_fail (iface != NULL, NULL);
|
||||
|
||||
@@ -670,7 +671,12 @@ parse_ifcfg (const char *iface, NMDeviceType type)
|
||||
|
||||
svCloseFile (file);
|
||||
|
||||
if (!nm_connection_verify (connection)) {
|
||||
if (!nm_connection_verify (connection, &error)) {
|
||||
g_warning ("%s: Invalid connection for %s: '%s' / '%s' invalid: %d",
|
||||
__func__, iface,
|
||||
g_type_name (nm_connection_lookup_setting_type_by_quark (error->domain)),
|
||||
error->message, error->code);
|
||||
g_error_free (error);
|
||||
g_object_unref (connection);
|
||||
connection = NULL;
|
||||
}
|
||||
|
Reference in New Issue
Block a user