diff options
author | Christian Grothoff <christian@grothoff.org> | 2019-04-06 16:27:51 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2019-04-06 16:27:51 +0200 |
commit | 6883d8a3b5727f00f1dedc50d8a770ae943d13ce (patch) | |
tree | f45f6094f1850f31ed466697ff5635d5de035ea7 | |
parent | 64be1fe4863900091a085e20630a8049d1ee37c0 (diff) | |
download | merchant-6883d8a3b5727f00f1dedc50d8a770ae943d13ce.tar.gz merchant-6883d8a3b5727f00f1dedc50d8a770ae943d13ce.tar.bz2 merchant-6883d8a3b5727f00f1dedc50d8a770ae943d13ce.zip |
add preflights, fix indentation
-rw-r--r-- | src/backend/taler-merchant-httpd_tip-authorize.c | 1 | ||||
-rw-r--r-- | src/backend/taler-merchant-httpd_tip-pickup.c | 8 | ||||
-rw-r--r-- | src/backend/taler-merchant-httpd_tip-reserve-helper.c | 2 |
3 files changed, 9 insertions, 2 deletions
diff --git a/src/backend/taler-merchant-httpd_tip-authorize.c b/src/backend/taler-merchant-httpd_tip-authorize.c index ad19616d..4a8ae032 100644 --- a/src/backend/taler-merchant-httpd_tip-authorize.c +++ b/src/backend/taler-merchant-httpd_tip-authorize.c @@ -225,6 +225,7 @@ MH_handler_tip_authorize (struct TMH_RequestHandler *rh, "exchange for tipping not configured for the instance"); } tac->ctr.reserve_priv = mi->tip_reserve; + db->preflight (db->cls); ec = db->authorize_tip_TR (db->cls, tac->justification, &tac->amount, diff --git a/src/backend/taler-merchant-httpd_tip-pickup.c b/src/backend/taler-merchant-httpd_tip-pickup.c index 3d96a18b..d7e19196 100644 --- a/src/backend/taler-merchant-httpd_tip-pickup.c +++ b/src/backend/taler-merchant-httpd_tip-pickup.c @@ -195,6 +195,7 @@ run_pickup (struct MHD_Connection *connection, pc->ec, pc->error_hint); } + db->preflight (db->cls); ec = db->pickup_tip_TR (db->cls, &pc->total, &pc->tip_id, @@ -377,6 +378,7 @@ prepare_pickup (struct PickupContext *pc) { enum GNUNET_DB_QueryStatus qs; + db->preflight (db->cls); qs = db->lookup_tip_by_id (db->cls, &pc->tip_id, &pc->exchange_url, @@ -488,8 +490,10 @@ MH_handler_tip_pickup (struct TMH_RequestHandler *rh, struct GNUNET_HashCode tip_id; json_t *planchets; struct GNUNET_JSON_Specification spec[] = { - GNUNET_JSON_spec_fixed_auto ("tip_id", &tip_id), - GNUNET_JSON_spec_json ("planchets", &planchets), + GNUNET_JSON_spec_fixed_auto ("tip_id", + &tip_id), + GNUNET_JSON_spec_json ("planchets", + &planchets), GNUNET_JSON_spec_end() }; struct PickupContext *pc; diff --git a/src/backend/taler-merchant-httpd_tip-reserve-helper.c b/src/backend/taler-merchant-httpd_tip-reserve-helper.c index 81b9e38d..1cf721cd 100644 --- a/src/backend/taler-merchant-httpd_tip-reserve-helper.c +++ b/src/backend/taler-merchant-httpd_tip-reserve-helper.c @@ -183,6 +183,7 @@ handle_status (void *cls, GNUNET_CRYPTO_hash (history[i].details.in_details.wire_reference, history[i].details.in_details.wire_reference_size, &uuid); + db->preflight (db->cls); qs = db->enable_tip_reserve_TR (db->cls, &ctr->reserve_priv, &uuid, @@ -311,6 +312,7 @@ TMH_check_tip_reserve (struct CheckTipReserve *ctr, const char *tip_exchange) { MHD_suspend_connection (ctr->connection); + db->preflight (db->cls); GNUNET_CONTAINER_DLL_insert (ctr_head, ctr_tail, ctr); |