settings: set @error on failure of nm_settings_plugin_add_connection()
authorBeniamino Galvani <bgalvani@redhat.com>
Thu, 3 Mar 2016 13:24:18 +0000 (14:24 +0100)
committerThomas Haller <thaller@redhat.com>
Thu, 3 Mar 2016 17:54:20 +0000 (18:54 +0100)
src/settings/nm-settings-plugin.c

index 2023bc1..7de7e59 100644 (file)
@@ -175,5 +175,7 @@ nm_settings_plugin_add_connection (NMSettingsPlugin *config,
        if (NM_SETTINGS_PLUGIN_GET_INTERFACE (config)->add_connection)
                return NM_SETTINGS_PLUGIN_GET_INTERFACE (config)->add_connection (config, connection, save_to_disk, error);
 
+       g_set_error_literal (error, NM_SETTINGS_ERROR, NM_SETTINGS_ERROR_NOT_SUPPORTED,
+                            "Plugin does not support adding connections");
        return NULL;
 }