mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-05 16:58:02 +02:00
settings: pass valid error code to g_set_error() in load_plugins()
Fixes: 7d04618645
Signed-off-by: Thomas Haller <thaller@redhat.com>
This commit is contained in:
parent
c7227ac734
commit
3423e54c4e
1 changed files with 3 additions and 3 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue