diff options
author | Thomas Haller <thaller@redhat.com> | 2014-10-27 16:14:56 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2014-10-27 20:45:23 +0100 |
commit | 3423e54c4e74b7a8c6b31450c5b5daadf6a2293f (patch) | |
tree | 8bd2c4f8dfecce1d1c88375691f1e94b6560456b | |
parent | c7227ac7347383985312a8a827dfa28dbfc9767f (diff) | |
download | NetworkManager-3423e54c4e74b7a8c6b31450c5b5daadf6a2293f.tar.gz |
settings: pass valid error code to g_set_error() in load_plugins()
Fixes: 7d04618645f797d84c3f8692af6dfac1d67cb376
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 1bf2734457..e9d3eaf24d 100644 --- a/src/settings/nm-settings.c +++ b/src/settings/nm-settings.c @@ -650,7 +650,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, NM_SETTINGS_ERROR, 0, + g_set_error (error, NM_SETTINGS_ERROR, NM_SETTINGS_ERROR_FAILED, "Could not load plugin '%s': %s", pname, g_module_error ()); g_free (full_name); @@ -663,7 +663,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, NM_SETTINGS_ERROR, 0, + g_set_error (error, NM_SETTINGS_ERROR, NM_SETTINGS_ERROR_FAILED, "Could not find plugin '%s' factory function.", pname); success = FALSE; @@ -672,7 +672,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, NM_SETTINGS_ERROR, 0, + g_set_error (error, NM_SETTINGS_ERROR, NM_SETTINGS_ERROR_FAILED, "Plugin '%s' returned invalid system config object.", pname); success = FALSE; |