summaryrefslogtreecommitdiff
path: root/src/lib/merchant_api_post_transfers.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-12-11 20:32:19 +0100
committerChristian Grothoff <christian@grothoff.org>2021-12-11 20:32:19 +0100
commit49e2e44b09dd845d0922c0acef5ff487b52bf26d (patch)
tree49ec4833067413047c26c5a60e2ccc32deeea9d2 /src/lib/merchant_api_post_transfers.c
parent9788501cb9773e618e976ef11ad498e1571050b2 (diff)
downloadmerchant-49e2e44b09dd845d0922c0acef5ff487b52bf26d.tar.gz
merchant-49e2e44b09dd845d0922c0acef5ff487b52bf26d.tar.bz2
merchant-49e2e44b09dd845d0922c0acef5ff487b52bf26d.zip
fix #7123
Diffstat (limited to 'src/lib/merchant_api_post_transfers.c')
-rw-r--r--src/lib/merchant_api_post_transfers.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/lib/merchant_api_post_transfers.c b/src/lib/merchant_api_post_transfers.c
index 488b0a7c..8b302ab1 100644
--- a/src/lib/merchant_api_post_transfers.c
+++ b/src/lib/merchant_api_post_transfers.c
@@ -26,6 +26,7 @@
#include <microhttpd.h> /* just for HTTP status codes */
#include <gnunet/gnunet_util_lib.h>
#include "taler_merchant_service.h"
+#include "merchant_api_curl_defaults.h"
#include <taler/taler_curl_lib.h>
#include <taler/taler_json_lib.h>
@@ -309,8 +310,7 @@ TALER_MERCHANT_transfers_post (
payto_uri),
GNUNET_JSON_pack_string ("exchange_url",
exchange_url));
- eh = curl_easy_init ();
- GNUNET_assert (NULL != eh);
+ eh = TALER_MERCHANT_curl_easy_get_ (pth->url);
if (GNUNET_OK !=
TALER_curl_easy_post (&pth->post_ctx,
eh,
@@ -319,14 +319,11 @@ TALER_MERCHANT_transfers_post (
GNUNET_break (0);
curl_easy_cleanup (eh);
json_decref (req);
+ GNUNET_free (pth->url);
GNUNET_free (pth);
return NULL;
}
json_decref (req);
- GNUNET_assert (CURLE_OK ==
- curl_easy_setopt (eh,
- CURLOPT_URL,
- pth->url));
pth->job = GNUNET_CURL_job_add2 (ctx,
eh,
pth->post_ctx.headers,