comparison src/c/http.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 68c8ffc4ae69
comparison
equal deleted inserted replaced
1940:1484ba362062 1941:9f3597979e98
445 445
446 void uw_copy_client_data(void *dst, void *src) { 446 void uw_copy_client_data(void *dst, void *src) {
447 } 447 }
448 448
449 void uw_do_expunge(uw_context ctx, uw_Basis_client cli, void *data) { 449 void uw_do_expunge(uw_context ctx, uw_Basis_client cli, void *data) {
450 do { 450 uw_ensure_transaction(ctx);
451 uw_ensure_transaction(ctx); 451 uw_get_app(ctx)->expunger(ctx, cli);
452 uw_get_app(ctx)->expunger(ctx, cli); 452
453 } while (uw_commit(ctx) && (uw_rollback(ctx, 1), 1)); 453 if (uw_commit(ctx))
454 uw_error(ctx, UNLIMITED_RETRY, "Rerunning expunge transaction");
454 } 455 }
455 456
456 void uw_post_expunge(uw_context ctx, void *data) { 457 void uw_post_expunge(uw_context ctx, void *data) {
457 } 458 }
458 459