# HG changeset patch # User Adam Chlipala # Date 1388165444 18000 # Node ID 3ecd0b6360eb2a8558c56136e34223657806c55b # Parent a671e5258a2c513fbc7a5d11b02b69aad4aa3d6c Change where a transaction is marked finished, to avoid forgetting to rollback a failed transaction diff -r a671e5258a2c -r 3ecd0b6360eb src/c/urweb.c --- a/src/c/urweb.c Fri Dec 27 12:10:03 2013 -0500 +++ b/src/c/urweb.c Fri Dec 27 12:30:44 2013 -0500 @@ -634,7 +634,6 @@ ctx->amInitializing = 0; ctx->usedSig = 0; ctx->needsResig = 0; - ctx->transaction_started = 0; } void uw_reset_keep_request(uw_context ctx) { @@ -648,6 +647,7 @@ memset(ctx->inputs, 0, ctx->app->inputs_len * sizeof(input)); memset(ctx->subinputs, 0, ctx->n_subinputs * sizeof(input)); ctx->used_subinputs = ctx->hasPostBody = ctx->isPost = 0; + ctx->transaction_started = 0; } failure_kind uw_begin_init(uw_context ctx) {