summaryrefslogtreecommitdiff
path: root/list.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2008-02-12 11:49:56 +0100
committerFelix Fietkau <nbd@openwrt.org>2008-02-12 11:49:56 +0100
commit7ca5c675d7dc21fa7767b64a42a1705bb800fc86 (patch)
treeda3688b27aecafa8dd5d8308b8c8cd3613d1a1f4 /list.c
parent7f054d4ea21d297185e9471b3bebb2c5c4bd7597 (diff)
downloaduci-7ca5c675d7dc21fa7767b64a42a1705bb800fc86.tar.gz
fix uci_set
Diffstat (limited to 'list.c')
-rw-r--r--list.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/list.c b/list.c
index a28c5e1..aabcab0 100644
--- a/list.c
+++ b/list.c
@@ -291,7 +291,7 @@ int uci_del_element(struct uci_context *ctx, struct uci_element *e)
}
p = s->package;
- if (!internal && p->confdir)
+ if (!internal && p->has_history)
uci_add_history(ctx, &p->history, UCI_CMD_REMOVE, s->e.name, option, NULL);
switch(e->type) {
@@ -354,7 +354,7 @@ int uci_set_element_value(struct uci_context *ctx, struct uci_element **element,
return 0;
}
p = s->package;
- if (!internal && p->confdir)
+ if (!internal && p->has_history)
uci_add_history(ctx, &p->history, UCI_CMD_CHANGE, section, option, value);
uci_list_del(&e->list);
@@ -388,7 +388,7 @@ int uci_rename(struct uci_context *ctx, struct uci_package *p, char *section, ch
/* NB: p, section, option validated by uci_lookup */
UCI_INTERNAL(uci_lookup, ctx, &e, p, section, option);
- if (!internal && p->confdir)
+ if (!internal && p->has_history)
uci_add_history(ctx, &p->history, UCI_CMD_RENAME, section, option, name);
name = uci_strdup(ctx, name);
@@ -493,7 +493,7 @@ notfound:
UCI_THROW(ctx, UCI_ERR_NOTFOUND);
/* now add the missing entry */
- if (!internal && p->confdir)
+ if (!internal && p->has_history)
uci_add_history(ctx, &p->history, UCI_CMD_CHANGE, section, option, value);
if (s) {
o = uci_alloc_option(s, option, value);