ifcfg-rh: don't chain up after failure of replace_and_commit()
authorBeniamino Galvani <bgalvani@redhat.com>
Wed, 30 Mar 2016 15:44:46 +0000 (17:44 +0200)
committerBeniamino Galvani <bgalvani@redhat.com>
Wed, 30 Mar 2016 16:12:32 +0000 (18:12 +0200)
If replace_and_commit() found existing route files (and the callback
has potentially already been invoked), it is wrong to chain up to
parent class and continue the update.

Fixes: f79d62692ec4fe5ba21bbeab26286b2a3b250fdd

src/settings/plugins/ifcfg-rh/nm-ifcfg-connection.c

index 2ee5a0b..b9bbf6d 100644 (file)
@@ -369,6 +369,7 @@ replace_and_commit (NMSettingsConnection *connection,
                        callback (connection, error, user_data);
                        g_clear_error (&error);
                }
+               return;
        }
 
        NM_SETTINGS_CONNECTION_CLASS (nm_ifcfg_connection_parent_class)->replace_and_commit (connection, new_connection, callback, user_data);