X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=ucw%2Fconf-context.c;h=050e43baaf47fc218e83f74aaf20479d83d14eeb;hb=f17e4350dcf0c033891e52b30b0c32a4a4fed5e0;hp=f4929644d5a74fb6da626c657d78724fc8a547d4;hpb=61dec66f0e14df50777adab21cd7d03488452a1e;p=libucw.git diff --git a/ucw/conf-context.c b/ucw/conf-context.c index f4929644..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,11 +30,13 @@ cf_new_context(void) } void -cf_free_context(struct cf_context *cc) +cf_delete_context(struct cf_context *cc) { - // FIXME: Roll back all transactions 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); }