changeset 1943:3ecd0b6360eb

Change where a transaction is marked finished, to avoid forgetting to rollback a failed transaction
author Adam Chlipala <adam@chlipala.net>
date Fri, 27 Dec 2013 12:30:44 -0500
parents a671e5258a2c
children 68c8ffc4ae69
files src/c/urweb.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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) {