projects
/
project
/
uci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b033290
)
make uci_lookup_ptr() use the extended flag properly again
author
Felix Fietkau
<nbd@openwrt.org>
Fri, 20 Aug 2010 13:51:07 +0000
(15:51 +0200)
committer
Felix Fietkau
<nbd@openwrt.org>
Fri, 20 Aug 2010 13:51:07 +0000
(15:51 +0200)
list.c
patch
|
blob
|
history
diff --git
a/list.c
b/list.c
index
0b3a3f2
..
c683dd2
100644
(file)
--- a/
list.c
+++ b/
list.c
@@
-387,10
+387,14
@@
uci_lookup_ptr(struct uci_context *ctx, struct uci_ptr *ptr, char *str, bool ext
/* if the section name validates as a regular name, pass through
* to the regular uci_lookup function call */
/* if the section name validates as a regular name, pass through
* to the regular uci_lookup function call */
- if (ptr->flags & UCI_LOOKUP_EXTENDED)
- e = uci_lookup_ext_section(ctx, ptr);
- else
+ if (ptr->flags & UCI_LOOKUP_EXTENDED) {
+ if (extended)
+ e = uci_lookup_ext_section(ctx, ptr);
+ else
+ UCI_THROW(ctx, UCI_ERR_INVAL);
+ } else {
e = uci_lookup_list(&ptr->p->sections, ptr->section);
e = uci_lookup_list(&ptr->p->sections, ptr->section);
+ }
if (!e)
goto abort;
if (!e)
goto abort;