[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-merchant] branch master updated: fix failure to initialize credit
From: |
gnunet |
Subject: |
[taler-merchant] branch master updated: fix failure to initialize credit_facade details if DB had NULL values |
Date: |
Mon, 11 Sep 2023 23:56:35 +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 6759228b fix failure to initialize credit_facade details if DB had
NULL values
6759228b is described below
commit 6759228b6010aaa70ddf153d15ace604328d4bf6
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Mon Sep 11 23:56:28 2023 +0200
fix failure to initialize credit_facade details if DB had NULL values
---
.../taler-merchant-httpd_private-post-account.c | 18 ++++++++++++------
src/backenddb/pg_select_account_by_uri.c | 2 ++
2 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/src/backend/taler-merchant-httpd_private-post-account.c
b/src/backend/taler-merchant-httpd_private-post-account.c
index 6ad3902d..793e6c79 100644
--- a/src/backend/taler-merchant-httpd_private-post-account.c
+++ b/src/backend/taler-merchant-httpd_private-post-account.c
@@ -153,8 +153,10 @@ TMH_private_post_account (const struct TMH_RequestHandler
*rh,
ad.payto_uri) ) &&
( (adx.credit_facade_credentials ==
ad.credit_facade_credentials) ||
- (1 == json_equal (adx.credit_facade_credentials,
- ad.credit_facade_credentials)) ) &&
+ ( (NULL != adx.credit_facade_credentials) &&
+ (NULL != ad.credit_facade_credentials) &&
+ (1 == json_equal (adx.credit_facade_credentials,
+ ad.credit_facade_credentials)) ) ) &&
( (adx.credit_facade_url == ad.credit_facade_url) ||
( (NULL != adx.credit_facade_url) &&
(NULL != ad.credit_facade_url) &&
@@ -165,10 +167,14 @@ TMH_private_post_account (const struct TMH_RequestHandler
*rh,
GNUNET_free (adx.payto_uri);
return TALER_MHD_REPLY_JSON_PACK (connection,
MHD_HTTP_OK,
- GNUNET_JSON_pack_data_auto
("salt",
-
&adx.salt),
- GNUNET_JSON_pack_data_auto
("h_wire",
-
&adx.h_wire));
+ GNUNET_JSON_pack_data_auto (
+ "salt",
+ &adx.
+ salt),
+ GNUNET_JSON_pack_data_auto (
+ "h_wire",
+ &adx.
+ h_wire));
}
break;
case GNUNET_DB_STATUS_SUCCESS_NO_RESULTS:
diff --git a/src/backenddb/pg_select_account_by_uri.c
b/src/backenddb/pg_select_account_by_uri.c
index a0fbffb3..1faeeb27 100644
--- a/src/backenddb/pg_select_account_by_uri.c
+++ b/src/backenddb/pg_select_account_by_uri.c
@@ -56,6 +56,8 @@ TMH_PG_select_account_by_uri (void *cls,
GNUNET_PQ_result_spec_end
};
+ ad->credit_facade_url = NULL;
+ ad->credit_facade_credentials = NULL;
ad->payto_uri = GNUNET_strdup (payto_uri);
check_connection (pg);
PREPARE (pg,
--
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: fix failure to initialize credit_facade details if DB had NULL values,
gnunet <=