merchant

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

commit bf16c6e29031e828c946a23002c323aa6f0d78de
parent 41eb57c7252bd14794502a7164acb5794df1a3ae
Author: Christian Grothoff <christian@grothoff.org>
Date:   Sun,  5 Jun 2022 23:48:41 +0200

-fix backenddb crash

Diffstat:
Msrc/backenddb/drop0001.sql | 5+----
Dsrc/backenddb/drop0002.sql | 31-------------------------------
Msrc/backenddb/test_merchantdb.c | 3+++
3 files changed, 4 insertions(+), 35 deletions(-)

diff --git a/src/backenddb/drop0001.sql b/src/backenddb/drop0001.sql @@ -26,10 +26,7 @@ BEGIN; -- Unregister patch (0003.sql) --SELECT _v.unregister_patch('merchant-0003'); --- Unregister patch (0002.sql) ---SELECT _v.unregister_patch('merchant-0002'); - --- Unregister patch (0001.sql) +SELECT _v.unregister_patch('merchant-0002'); SELECT _v.unregister_patch('merchant-0001'); diff --git a/src/backenddb/drop0002.sql b/src/backenddb/drop0002.sql @@ -1,31 +0,0 @@ --- --- This file is part of TALER --- Copyright (C) 2014--2021 Taler Systems SA --- --- TALER is free software; you can redistribute it and/or modify it under the --- terms of the GNU General Public License as published by the Free Software --- Foundation; either version 3, or (at your option) any later version. --- --- TALER is distributed in the hope that it will be useful, but WITHOUT ANY --- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR --- A PARTICULAR PURPOSE. See the GNU General Public License for more details. --- --- You should have received a copy of the GNU General Public License along with --- TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/> --- - --- Everything in one big transaction -BEGIN; - -SELECT _v.unregister_patch('merchant-0002'); - - --- Drops for 0002.sql -ALTER TABLE merchant_instances - DROP COLUMN website, - DROP COLUMN email, - DROP COLUMN logo; - - --- And we're out of here... -COMMIT; diff --git a/src/backenddb/test_merchantdb.c b/src/backenddb/test_merchantdb.c @@ -100,6 +100,9 @@ static void make_instance (char *instance_id, struct InstanceData *instance) { + memset (instance, + 0, + sizeof (*instance)); GNUNET_CRYPTO_eddsa_key_create (&instance->merchant_priv.eddsa_priv); GNUNET_CRYPTO_eddsa_key_get_public (&instance->merchant_priv.eddsa_priv, &instance->merchant_pub.eddsa_pub);