X-Git-Url: http://git.openwrt.org/?p=project%2Fuci.git;a=blobdiff_plain;f=file.c;h=d2fdf5862cd9a0eb92f6e3f78a97f0b908508f98;hp=9f59637d06ff33471227effe86ea9cbf4af64d64;hb=7ca5c675d7dc21fa7767b64a42a1705bb800fc86;hpb=80e2e58f4e4c0d8ff492281fa998d550a85b4d92 diff --git a/file.c b/file.c index 9f59637..d2fdf58 100644 --- a/file.c +++ b/file.c @@ -293,7 +293,6 @@ int uci_import(struct uci_context *ctx, FILE *stream, const char *name, struct u UCI_HANDLE_ERR(ctx); /* make sure no memory from previous parse attempts is leaked */ - ctx->internal = true; uci_cleanup(ctx); uci_alloc_parse_context(ctx); @@ -375,7 +374,7 @@ void uci_file_commit(struct uci_context *ctx, struct uci_package **package, bool /* flush unsaved changes and reload from history file */ UCI_TRAP_SAVE(ctx, done); - if (p->confdir) { + if (p->has_history) { if (!overwrite) { name = uci_strdup(ctx, p->e.name); path = uci_strdup(ctx, p->path); @@ -392,7 +391,7 @@ void uci_file_commit(struct uci_context *ctx, struct uci_package **package, bool UCI_INTERNAL(uci_import, ctx, f, name, &p, true); p->path = path; - p->confdir = true; + p->has_history = true; *package = p; /* freed together with the uci_package */ @@ -517,7 +516,7 @@ static struct uci_package *uci_file_load(struct uci_context *ctx, const char *na if (package) { package->path = filename; - package->confdir = confdir; + package->has_history = confdir; uci_load_history(ctx, package, false); }