summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2008-08-27 16:43:40 +0200
committerFelix Fietkau <nbd@openwrt.org>2008-08-27 16:43:40 +0200
commit289e14f9fa5472589b85bdae102aece71d858ecd (patch)
treed6b543342b36ac3cad4097909f95e41c5e25b567
parent2ade5d42fba9f4eed4b5bba8fbff863b6149d13a (diff)
downloaduci-289e14f9fa5472589b85bdae102aece71d858ecd.tar.gz
fix incomplete lookups for uci.get()
-rw-r--r--lua/uci.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lua/uci.c b/lua/uci.c
index f87ce27..7f4ba99 100644
--- a/lua/uci.c
+++ b/lua/uci.c
@@ -296,6 +296,10 @@ uci_lua_get_any(lua_State *L, bool all)
err = UCI_ERR_INVAL;
goto error;
}
+ if (!(ptr.flags & UCI_LOOKUP_COMPLETE)) {
+ err = UCI_ERR_NOTFOUND;
+ goto error;
+ }
err = UCI_OK;
e = ptr.last;