aboutsummaryrefslogtreecommitdiff
path: root/src/lib/merchant_api_wallet_get_order.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-03-13 10:53:10 +0100
committerChristian Grothoff <christian@grothoff.org>2021-03-13 10:53:10 +0100
commita3fd8a78b07f49b31cf76c99d1d859f6c62baceb (patch)
tree5fada617e9cf7608331e2fd7ade0c279ddcefe4b /src/lib/merchant_api_wallet_get_order.c
parent2ae55e5e7ff366ed1e4602710663a25f2f85420f (diff)
downloadmerchant-a3fd8a78b07f49b31cf76c99d1d859f6c62baceb.tar.gz
merchant-a3fd8a78b07f49b31cf76c99d1d859f6c62baceb.tar.bz2
merchant-a3fd8a78b07f49b31cf76c99d1d859f6c62baceb.zip
clean up url_join calls
Diffstat (limited to 'src/lib/merchant_api_wallet_get_order.c')
-rw-r--r--src/lib/merchant_api_wallet_get_order.c26
1 files changed, 18 insertions, 8 deletions
diff --git a/src/lib/merchant_api_wallet_get_order.c b/src/lib/merchant_api_wallet_get_order.c
index 5979e69f..0452d70d 100644
--- a/src/lib/merchant_api_wallet_get_order.c
+++ b/src/lib/merchant_api_wallet_get_order.c
@@ -264,19 +264,15 @@ TALER_MERCHANT_wallet_order_get (struct GNUNET_CURL_Context *ctx,
h_contract_s.encoding,
"session_id",
session_id,
+ "timeout_ms",
(0 != tms)
- ? "timeout_ms"
- : NULL,
- timeout_ms,
- (NULL != min_refund)
- ? "refund"
+ ? timeout_ms
: NULL,
+ "refund",
(NULL != min_refund)
? TALER_amount2s (min_refund)
: NULL,
- await_refund_obtained
- ? "await_refund_obtained"
- : NULL,
+ "await_refund_obtained",
await_refund_obtained
? "yes"
: NULL,
@@ -302,6 +298,20 @@ TALER_MERCHANT_wallet_order_get (struct GNUNET_CURL_Context *ctx,
GNUNET_free (owgh);
return NULL;
}
+ if (0 != tms)
+ {
+ if (CURLE_OK !=
+ curl_easy_setopt (eh,
+ CURLOPT_TIMEOUT_MS,
+ (long) tms))
+ {
+ GNUNET_break (0);
+ curl_easy_cleanup (eh);
+ GNUNET_free (owgh->url);
+ GNUNET_free (owgh);
+ return NULL;
+ }
+ }
if (CURLE_OK !=
curl_easy_setopt (eh,
CURLOPT_URL,