X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=ucw%2Fconf-context.c;h=050e43baaf47fc218e83f74aaf20479d83d14eeb;hb=d4123b266f32fe1c84c03cc66ed7cc6c943a355b;hp=8a7b4a6b113a772e552fcf2225b9f6bbec5147a1;hpb=5125afc819f831bd8a77ea144b2bba49a9528a97;p=libucw.git diff --git a/ucw/conf-context.c b/ucw/conf-context.c index 8a7b4a6b..050e43ba 100644 --- a/ucw/conf-context.c +++ b/ucw/conf-context.c @@ -17,7 +17,7 @@ static struct cf_context cf_default_context; static void cf_init_context(struct cf_context *cc) { - cc->need_journal = 1; + cc->enable_journal = 1; clist_init(&cc->conf_entries); } @@ -30,10 +30,13 @@ cf_new_context(void) } void -cf_free_context(struct cf_context *cc) +cf_delete_context(struct cf_context *cc) { ASSERT(!cc->is_active); ASSERT(cc != &cf_default_context); + struct cf_context *prev = cf_switch_context(cc); + cf_revert(); + cf_switch_context(prev); xfree(cc->parser); xfree(cc); }