From 27cef8e19174dacd5744c6944a76ebc5afa27130 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sun, 3 Feb 2008 01:55:32 +0100 Subject: [PATCH] minor comments --- file.c | 6 ++++++ 1 file changed, 6 insertions(+) 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); -- 2.30.2