minor comments
authorFelix Fietkau <nbd@openwrt.org>
Sun, 3 Feb 2008 00:55:32 +0000 (01:55 +0100)
committerFelix Fietkau <nbd@openwrt.org>
Sun, 3 Feb 2008 00:55:32 +0000 (01:55 +0100)
file.c

diff --git a/file.c b/file.c
index 7188a90a59b902f135a0cffdc00530c07a430f7a..23ea9595974826c8a8cf85fb37909794c12d4a00 100644 (file)
--- 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);