From: Felix Fietkau Date: Sun, 3 Feb 2008 00:55:32 +0000 (+0100) Subject: minor comments X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=27cef8e19174dacd5744c6944a76ebc5afa27130;p=uci.git minor comments --- diff --git a/file.c b/file.c index 7188a90..23ea959 100644 --- a/file.c +++ b/file.c @@ -907,8 +907,14 @@ int uci_commit(struct uci_context *ctx, struct uci_package **package, bool overw if (!overwrite) { name = uci_strdup(ctx, p->e.name); path = uci_strdup(ctx, p->path); + /* dump our own changes to the history file */ if (!uci_list_empty(&p->history)) UCI_INTERNAL(uci_save, ctx, p); + + /* + * other processes might have modified the config + * as well. dump and reload + */ uci_free_package(&p); uci_file_cleanup(ctx); UCI_INTERNAL(uci_import, ctx, f, name, &p, true);