Never save a partial configuration

This commit is contained in:
Pierre Pronchery 2012-08-10 22:57:51 +00:00
parent ec03ad6baf
commit b66a183970

View File

@ -2329,7 +2329,8 @@ static void _plugins_on_ok(gpointer data)
#ifdef DEBUG
fprintf(stderr, "DEBUG: %s() value=\"%s\"\n", __func__, value);
#endif
if(_phone_config_set_type(phone, NULL, NULL, "plugins", value) == 0)
if(res == 0 && _phone_config_set_type(phone, NULL, NULL, "plugins",
value) == 0)
_phone_config_save(phone);
string_delete(value);
_plugins_on_cancel(phone);