merchant

Merchant backend to process payments, run by merchants
Log | Files | Refs | Submodules | README | LICENSE

commit 1d5bd1999987323adf353a31f46c81c0685d8c4f
parent 1d4d3feb7ff648327f0817bc2e5b8a1d19683719
Author: priscilla <priscilla.huang@efrei.net>
Date:   Mon, 20 Feb 2023 12:19:35 -0500

allow pos_key being NULL

Diffstat:
Msrc/backend/taler-merchant-httpd_private-post-templates.c | 8++++++--
Msrc/testing/testing_api_cmd_post_templates.c | 4----
2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/backend/taler-merchant-httpd_private-post-templates.c b/src/backend/taler-merchant-httpd_private-post-templates.c @@ -47,8 +47,12 @@ templates_equal (const struct TALER_MERCHANTDB_TemplateDetails *t1, { return ( (0 == strcmp (t1->template_description, t2->template_description)) && - (0 == strcmp (t1->pos_key, - t2->pos_key) ) && + ( ( (NULL == t1->pos_key) && + (NULL == t2->pos_key) ) || + ( (NULL != t1->pos_key) && + (NULL != t2->pos_key) && + (0 == strcmp (t1->pos_key, + t2->pos_key))) ) && (1 == json_equal (t1->template_contract, t2->template_contract)) ); } diff --git a/src/testing/testing_api_cmd_post_templates.c b/src/testing/testing_api_cmd_post_templates.c @@ -97,10 +97,6 @@ post_templates_cb (void *cls, hr->http_status, (int) hr->ec, TALER_TESTING_interpreter_get_current_label (tis->is)); - GNUNET_log (GNUNET_ERROR_TYPE_ERROR, - "tis %u vs hr %u", - tis->http_status, - hr->http_status); TALER_TESTING_interpreter_fail (tis->is); return; }