summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2008-09-05 01:20:09 +0200
committerFelix Fietkau <nbd@openwrt.org>2008-09-05 01:20:09 +0200
commit717cda86ce1c902b71061ff19768a8567cf1074e (patch)
tree96bdfde45fc03558c47e3aa75752d0eefad27389
parent537690838e712f360009b3859a6d5f155465e2a5 (diff)
downloaduci-717cda86ce1c902b71061ff19768a8567cf1074e.tar.gz
fix uci batch nesting check (patch by lars)
-rw-r--r--cli.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/cli.c b/cli.c
index 305d9fe..9a4f819 100644
--- 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;
}