aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpriscilla <priscilla.huang@efrei.net>2023-02-20 12:19:35 -0500
committerpriscilla <priscilla.huang@efrei.net>2023-02-20 12:19:41 -0500
commit1d5bd1999987323adf353a31f46c81c0685d8c4f (patch)
tree1c18169aceab4f65c6c8e0403856d7b16ec847d0
parent1d4d3feb7ff648327f0817bc2e5b8a1d19683719 (diff)
allow pos_key being NULL
-rw-r--r--src/backend/taler-merchant-httpd_private-post-templates.c8
-rw-r--r--src/testing/testing_api_cmd_post_templates.c4
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
index 91f8c182..ac2a9206 100644
--- 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
index 85dea3a4..434ddb96 100644
--- 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;
}