summaryrefslogtreecommitdiff
path: root/src/bank-lib/testing_api_cmd_history.c
diff options
context:
space:
mode:
authorMarcello Stanisci <stanisci.m@gmail.com>2018-04-23 15:59:48 +0200
committerMarcello Stanisci <stanisci.m@gmail.com>2018-04-23 15:59:48 +0200
commitb8ab8f01c7c1deee65091c9dfb40401a0ba420d2 (patch)
tree48d0c3e7fe384a779dc84d8abb6ba2947c9a410d /src/bank-lib/testing_api_cmd_history.c
parent202827ebdaafdf33b78c202bcbb6917dd65dd1c1 (diff)
downloadexchange-b8ab8f01c7c1deee65091c9dfb40401a0ba420d2.tar.gz
exchange-b8ab8f01c7c1deee65091c9dfb40401a0ba420d2.tar.bz2
exchange-b8ab8f01c7c1deee65091c9dfb40401a0ba420d2.zip
address double-slash situation.
Diffstat (limited to 'src/bank-lib/testing_api_cmd_history.c')
-rw-r--r--src/bank-lib/testing_api_cmd_history.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/bank-lib/testing_api_cmd_history.c b/src/bank-lib/testing_api_cmd_history.c
index 6f005360..ccd29e1c 100644
--- a/src/bank-lib/testing_api_cmd_history.c
+++ b/src/bank-lib/testing_api_cmd_history.c
@@ -184,7 +184,7 @@ print_expected (struct History *h,
for (uint64_t i=0;i<h_len;i++)
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
- "H(%llu): %s%s (serial: %llu, subject: %s, to: %s)\n",
+ "H(%llu): %s%s (serial: %llu, subject: %s, counterpart: %s)\n",
(unsigned long long) i,
(TALER_BANK_DIRECTION_CREDIT == h[i].direction) ? "+" : "-",
TALER_amount2s (&h[i].details.amount),
@@ -409,8 +409,11 @@ build_history (struct TALER_TESTING_Interpreter *is,
h[total].direction = TALER_BANK_DIRECTION_CREDIT;
if (GNUNET_YES == cancelled)
h[total].direction |= TALER_BANK_DIRECTION_CANCEL;
+
GNUNET_asprintf (&h[total].details.account_url,
- "payto://x-taler-bank/%s/%llu",
+ ('/' == hs->bank_url[strlen(hs->bank_url) -1])
+ ? "payto://x-taler-bank/%s%llu"
+ : "payto://x-taler-bank/%s/%llu",
hs->bank_url,
(unsigned long long) *debit_account_no);
}
@@ -420,8 +423,11 @@ build_history (struct TALER_TESTING_Interpreter *is,
h[total].direction = TALER_BANK_DIRECTION_DEBIT;
if (GNUNET_YES == cancelled)
h[total].direction |= TALER_BANK_DIRECTION_CANCEL;
+
GNUNET_asprintf (&h[total].details.account_url,
- "payto://x-taler-bank/%s/%llu",
+ ('/' == hs->bank_url[strlen(hs->bank_url) -1])
+ ? "payto://x-taler-bank/%s%llu"
+ : "payto://x-taler-bank/%s/%llu",
hs->bank_url,
(unsigned long long) *credit_account_no);
}