keyfile: clean up logging connection verify errors

Prevents:

Connection failed to verify: (unknown)
   invalid or missing connection property 'blah blah/foo bar'

Simply removing the warning in reader.c is fine, because callers that
care already log the warning themselves.  Also make the warning in
update_connection() the same as the warning in new_connection().
This commit is contained in:
Dan Williams 2014-06-11 13:32:00 -05:00
parent db2995c162
commit 7b69d8f9c3
2 changed files with 2 additions and 3 deletions

View file

@ -110,7 +110,8 @@ update_connection (SCPluginKeyfile *self,
tmp = nm_keyfile_connection_new (NULL, name, &error);
if (!tmp) {
/* Error; remove the connection */
nm_log_warn (LOGD_SETTINGS, " %s", (error && error->message) ? error->message : "(unknown)");
nm_log_warn (LOGD_SETTINGS, " error in connection %s: %s", name,
(error && error->message) ? error->message : "(unknown)");
g_clear_error (&error);
remove_connection (self, connection);
return;

View file

@ -1316,8 +1316,6 @@ nm_keyfile_plugin_connection_from_file (const char *filename, GError **error)
g_clear_error (&verify_error);
g_object_unref (connection);
connection = NULL;
nm_log_warn (LOGD_SETTINGS, "Connection failed to verify: %s",
verify_error ? g_type_name (nm_connection_lookup_setting_type_by_quark (verify_error->domain)) : "(unknown)");
}
out: