summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/merchant_api_merchant_get_order.c3
-rw-r--r--src/lib/merchant_api_wallet_get_order.c26
2 files changed, 19 insertions, 10 deletions
diff --git a/src/lib/merchant_api_merchant_get_order.c b/src/lib/merchant_api_merchant_get_order.c
index 7cce082a..466f2cd1 100644
--- a/src/lib/merchant_api_merchant_get_order.c
+++ b/src/lib/merchant_api_merchant_get_order.c
@@ -489,8 +489,7 @@ TALER_MERCHANT_merchant_order_get (struct GNUNET_CURL_Context *ctx,
path,
"session_id", session_id,
"transfer", transfer ? "YES" : "NO",
- (0 != tms) ? "timeout_ms" : NULL,
- timeout_ms,
+ "timeout_ms", (0 != tms) ? timeout_ms : NULL,
NULL);
GNUNET_free (path);
}
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,