Mercurial > urweb
comparison src/c/cgi.c @ 1941:9f3597979e98
Tweaking handling of database transactions
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Wed, 25 Dec 2013 13:11:43 -0500 |
parents | d02c1a0d8082 |
children | c93fbd139732 |
comparison
equal
deleted
inserted
replaced
1940:1484ba362062 | 1941:9f3597979e98 |
---|---|
132 | 132 |
133 void uw_copy_client_data(void *dst, void *src) { | 133 void uw_copy_client_data(void *dst, void *src) { |
134 } | 134 } |
135 | 135 |
136 void uw_do_expunge(uw_context ctx, uw_Basis_client cli, void *data) { | 136 void uw_do_expunge(uw_context ctx, uw_Basis_client cli, void *data) { |
137 do { | 137 uw_ensure_transaction(ctx); |
138 uw_ensure_transaction(ctx); | 138 uw_get_app(ctx)->expunger(ctx, cli); |
139 uw_get_app(ctx)->expunger(ctx, cli); | 139 |
140 } while (uw_commit(ctx) && (uw_rollback(ctx, 1), 1)); | 140 if (uw_commit(ctx)) |
141 uw_error(ctx, UNLIMITED_RETRY, "Rerunning expunge transaction"); | |
141 } | 142 } |
142 | 143 |
143 void uw_post_expunge(uw_context ctx, void *data) { | 144 void uw_post_expunge(uw_context ctx, void *data) { |
144 } | 145 } |
145 | 146 |