[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-merchant] branch master updated: properly handle instance already
From: |
gnunet |
Subject: |
[taler-merchant] branch master updated: properly handle instance already exists case (#6812) |
Date: |
Fri, 02 Apr 2021 15:25:18 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository merchant.
The following commit(s) were added to refs/heads/master by this push:
new 9bec95fe properly handle instance already exists case (#6812)
9bec95fe is described below
commit 9bec95fe28aa83f03f1a5bac25201b037e9564d3
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Fri Apr 2 15:25:14 2021 +0200
properly handle instance already exists case (#6812)
---
src/backend/taler-merchant-httpd_private-post-instances.c | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/src/backend/taler-merchant-httpd_private-post-instances.c
b/src/backend/taler-merchant-httpd_private-post-instances.c
index d251a9d0..fbfb13c5 100644
--- a/src/backend/taler-merchant-httpd_private-post-instances.c
+++ b/src/backend/taler-merchant-httpd_private-post-instances.c
@@ -123,6 +123,8 @@ free_mi (struct TMH_MerchantInstance *mi)
}
GNUNET_free (mi->settings.id);
GNUNET_free (mi->settings.name);
+ json_decref (mi->settings.address);
+ json_decref (mi->settings.jurisdiction);
GNUNET_free (mi);
}
@@ -448,9 +450,18 @@ TMH_private_post_instances (const struct
TMH_RequestHandler *rh,
&mi->auth);
if (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT != qs)
{
- GNUNET_break (GNUNET_DB_STATUS_SOFT_ERROR == qs);
+ MHD_RESULT ret;
+
TMH_db->rollback (TMH_db->cls);
- goto retry;
+ if (GNUNET_DB_STATUS_SOFT_ERROR == qs)
+ goto retry;
+ ret = TALER_MHD_reply_with_error (connection,
+ MHD_HTTP_CONFLICT,
+
TALER_EC_MERCHANT_PRIVATE_POST_INSTANCES_ALREADY_EXISTS,
+ is.id);
+ GNUNET_JSON_parse_free (spec);
+ free_mi (mi);
+ return ret;
}
for (struct TMH_WireMethod *wm = wm_head;
NULL != wm;
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-merchant] branch master updated: properly handle instance already exists case (#6812),
gnunet <=