]> pilppa.com Git - uci.git/commitdiff
fix uci batch nesting check (patch by lars)
authorFelix Fietkau <nbd@openwrt.org>
Thu, 4 Sep 2008 23:20:09 +0000 (01:20 +0200)
committerFelix Fietkau <nbd@openwrt.org>
Thu, 4 Sep 2008 23:20:09 +0000 (01:20 +0200)
cli.c

diff --git a/cli.c b/cli.c
index 305d9fed4b3a83a3118c573b47da51f6bf144313..9a4f8191075e0555de47563b69aba18e943d85de 100644 (file)
--- a/cli.c
+++ b/cli.c
@@ -440,6 +440,7 @@ static int uci_batch(void)
 {
        int ret = 0;
 
+       flags |= CLI_FLAG_BATCH;
        while (!feof(input)) {
                struct uci_element *e, *tmp;
 
@@ -454,6 +455,8 @@ static int uci_batch(void)
                        uci_unload(ctx, uci_to_package(e));
                }
        }
+       flags &= ~CLI_FLAG_BATCH;
+
        return 0;
 }