summaryrefslogtreecommitdiff
path: root/src/lib/merchant_api_patch_instance.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-04-16 23:07:14 +0200
committerChristian Grothoff <christian@grothoff.org>2021-04-16 23:07:14 +0200
commit4a6f917151c9a33d22d57467d3bc110add0fe11f (patch)
tree2cc4979a74e32695ddc1bf4c40c8cf8d543445e0 /src/lib/merchant_api_patch_instance.c
parent7d425da40e2500456caab083518b889921945356 (diff)
downloadmerchant-4a6f917151c9a33d22d57467d3bc110add0fe11f.tar.gz
merchant-4a6f917151c9a33d22d57467d3bc110add0fe11f.tar.bz2
merchant-4a6f917151c9a33d22d57467d3bc110add0fe11f.zip
enable use of per-instance APIs also in C API
Diffstat (limited to 'src/lib/merchant_api_patch_instance.c')
-rw-r--r--src/lib/merchant_api_patch_instance.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/lib/merchant_api_patch_instance.c b/src/lib/merchant_api_patch_instance.c
index 2fc8eaff..f51bb953 100644
--- a/src/lib/merchant_api_patch_instance.c
+++ b/src/lib/merchant_api_patch_instance.c
@@ -223,6 +223,7 @@ TALER_MERCHANT_instance_patch (
iph->ctx = ctx;
iph->cb = cb;
iph->cb_cls = cb_cls;
+ if (NULL != instance_id)
{
char *path;
@@ -234,6 +235,13 @@ TALER_MERCHANT_instance_patch (
NULL);
GNUNET_free (path);
}
+ else
+ {
+ /* backend_url is already identifying the instance */
+ iph->url = TALER_url_join (backend_url,
+ "/private",
+ NULL);
+ }
if (NULL == iph->url)
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
@@ -253,6 +261,7 @@ TALER_MERCHANT_instance_patch (
{
GNUNET_break (0);
json_decref (req_obj);
+ GNUNET_free (iph->url);
GNUNET_free (iph);
return NULL;
}