From 4e55f6b3829420be74d35db2e55bafb18ac8ce21 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Tue, 12 Feb 2008 12:24:36 +0100 Subject: [PATCH 1/1] consistency --- list.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/list.c b/list.c index fb4d478..376d38b 100644 --- a/list.c +++ b/list.c @@ -401,6 +401,7 @@ int uci_rename(struct uci_context *ctx, struct uci_package *p, char *section, ch int uci_add_section(struct uci_context *ctx, struct uci_package *p, char *type, struct uci_section **res) { + bool internal = ctx->internal; struct uci_section *s; UCI_HANDLE_ERR(ctx); @@ -408,7 +409,8 @@ int uci_add_section(struct uci_context *ctx, struct uci_package *p, char *type, s = uci_alloc_section(p, type, NULL); uci_fixup_section(ctx, s); *res = s; - uci_add_history(ctx, &p->history, UCI_CMD_ADD, s->e.name, NULL, type); + if (!internal && p->has_history) + uci_add_history(ctx, &p->history, UCI_CMD_ADD, s->e.name, NULL, type); return 0; } -- 2.11.0