summaryrefslogtreecommitdiff
path: root/src/backend/taler-merchant-httpd_exchanges.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-04-17 14:07:06 +0200
committerChristian Grothoff <christian@grothoff.org>2020-04-17 14:07:24 +0200
commit0b8e550d09635f762033626c8c12b7b4a0d0faf7 (patch)
tree986a09d537a5dfde4b65fabd018c0f74d2778457 /src/backend/taler-merchant-httpd_exchanges.c
parent0a327ceebd3126d4adf69916e92702fe3c7a22e2 (diff)
downloadmerchant-0b8e550d09635f762033626c8c12b7b4a0d0faf7.tar.gz
merchant-0b8e550d09635f762033626c8c12b7b4a0d0faf7.tar.bz2
merchant-0b8e550d09635f762033626c8c12b7b4a0d0faf7.zip
starting v1 protocol dispatching logic
Diffstat (limited to 'src/backend/taler-merchant-httpd_exchanges.c')
-rw-r--r--src/backend/taler-merchant-httpd_exchanges.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/backend/taler-merchant-httpd_exchanges.c b/src/backend/taler-merchant-httpd_exchanges.c
index 190f5db0..11f845f1 100644
--- a/src/backend/taler-merchant-httpd_exchanges.c
+++ b/src/backend/taler-merchant-httpd_exchanges.c
@@ -380,10 +380,10 @@ process_wire_fees (struct Exchange *exchange,
wire_method,
GNUNET_STRINGS_absolute_time_to_string (af->start_date),
TALER_amount2s (&af->wire_fee));
- db->preflight (db->cls);
+ TMH_db->preflight (TMH_db->cls);
if (GNUNET_OK !=
- db->start (db->cls,
- "store wire fee"))
+ TMH_db->start (TMH_db->cls,
+ "store wire fee"))
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"Failed to start database transaction to store exchange wire fees (will try to continue anyway)!\n");
@@ -391,21 +391,21 @@ process_wire_fees (struct Exchange *exchange,
fees = fees->next;
continue;
}
- qs = db->store_wire_fee_by_exchange (db->cls,
- master_pub,
- &h_wire_method,
- &af->wire_fee,
- &af->closing_fee,
- af->start_date,
- af->end_date,
- &af->master_sig);
+ qs = TMH_db->store_wire_fee_by_exchange (TMH_db->cls,
+ master_pub,
+ &h_wire_method,
+ &af->wire_fee,
+ &af->closing_fee,
+ af->start_date,
+ af->end_date,
+ &af->master_sig);
if (0 > qs)
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"Failed to persist exchange wire fees in merchant DB (will try to continue anyway)!\n");
GNUNET_free (af);
fees = fees->next;
- db->rollback (db->cls);
+ TMH_db->rollback (TMH_db->cls);
continue;
}
if (0 == qs)
@@ -413,12 +413,12 @@ process_wire_fees (struct Exchange *exchange,
/* Entry was already in DB, fine, continue as if we had succeeded */
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Fees already in DB, rolling back transaction attempt!\n");
- db->rollback (db->cls);
+ TMH_db->rollback (TMH_db->cls);
}
if (0 < qs)
{
/* Inserted into DB, make sure transaction completes */
- qs = db->commit (db->cls);
+ qs = TMH_db->commit (TMH_db->cls);
if (0 > qs)
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,