Mercurial > urweb
comparison src/c/urweb.c @ 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 | d7bec4e63415 |
comparison
equal
deleted
inserted
replaced
1942:a671e5258a2c | 1943:3ecd0b6360eb |
---|---|
632 ctx->queryString = NULL; | 632 ctx->queryString = NULL; |
633 ctx->nextId = 0; | 633 ctx->nextId = 0; |
634 ctx->amInitializing = 0; | 634 ctx->amInitializing = 0; |
635 ctx->usedSig = 0; | 635 ctx->usedSig = 0; |
636 ctx->needsResig = 0; | 636 ctx->needsResig = 0; |
637 ctx->transaction_started = 0; | |
638 } | 637 } |
639 | 638 |
640 void uw_reset_keep_request(uw_context ctx) { | 639 void uw_reset_keep_request(uw_context ctx) { |
641 uw_reset_keep_error_message(ctx); | 640 uw_reset_keep_error_message(ctx); |
642 ctx->error_message[0] = 0; | 641 ctx->error_message[0] = 0; |
646 uw_reset_keep_request(ctx); | 645 uw_reset_keep_request(ctx); |
647 if (ctx->app) | 646 if (ctx->app) |
648 memset(ctx->inputs, 0, ctx->app->inputs_len * sizeof(input)); | 647 memset(ctx->inputs, 0, ctx->app->inputs_len * sizeof(input)); |
649 memset(ctx->subinputs, 0, ctx->n_subinputs * sizeof(input)); | 648 memset(ctx->subinputs, 0, ctx->n_subinputs * sizeof(input)); |
650 ctx->used_subinputs = ctx->hasPostBody = ctx->isPost = 0; | 649 ctx->used_subinputs = ctx->hasPostBody = ctx->isPost = 0; |
650 ctx->transaction_started = 0; | |
651 } | 651 } |
652 | 652 |
653 failure_kind uw_begin_init(uw_context ctx) { | 653 failure_kind uw_begin_init(uw_context ctx) { |
654 int r = setjmp(ctx->jmp_buf); | 654 int r = setjmp(ctx->jmp_buf); |
655 | 655 |