diff options
author | Thomas Haller <thaller@redhat.com> | 2014-10-21 14:35:22 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2014-10-21 14:35:22 +0200 |
commit | 7d04618645f797d84c3f8692af6dfac1d67cb376 (patch) | |
tree | fcfde880f98692a698a3ce96d2976b47b686dcf9 | |
parent | 4ad7cda7a43e4ec9f0646f2169c435b25b4d182e (diff) | |
download | NetworkManager-7d04618645f797d84c3f8692af6dfac1d67cb376.tar.gz |
settings: pass valid error domain to g_set_error() in load_plugins()
glib asserts that the error domain parameter is a non-zero quark.
Signed-off-by: Thomas Haller <thaller@redhat.com>
-rw-r--r-- | src/settings/nm-settings.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/settings/nm-settings.c b/src/settings/nm-settings.c index e3f0d33f75..f4ab2839d4 100644 --- a/src/settings/nm-settings.c +++ b/src/settings/nm-settings.c @@ -651,7 +651,7 @@ load_plugins (NMSettings *self, const char **plugins, GError **error) plugin = g_module_open (path, G_MODULE_BIND_LOCAL); if (!plugin) { - g_set_error (error, 0, 0, + g_set_error (error, NM_SETTINGS_ERROR, 0, "Could not load plugin '%s': %s", pname, g_module_error ()); g_free (full_name); @@ -664,7 +664,7 @@ load_plugins (NMSettings *self, const char **plugins, GError **error) g_free (path); if (!g_module_symbol (plugin, "nm_system_config_factory", (gpointer) (&factory_func))) { - g_set_error (error, 0, 0, + g_set_error (error, NM_SETTINGS_ERROR, 0, "Could not find plugin '%s' factory function.", pname); success = FALSE; @@ -673,7 +673,7 @@ load_plugins (NMSettings *self, const char **plugins, GError **error) obj = (*factory_func) (); if (!obj || !NM_IS_SYSTEM_CONFIG_INTERFACE (obj)) { - g_set_error (error, 0, 0, + g_set_error (error, NM_SETTINGS_ERROR, 0, "Plugin '%s' returned invalid system config object.", pname); success = FALSE; |