From 44b894ebe16f2646b49429bc45208dabb8bbc30b Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 28 Mar 2015 12:29:35 +0100 Subject: more rename-fest work --- src/mintdb/test_mintdb_deposits.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'src/mintdb/test_mintdb_deposits.c') diff --git a/src/mintdb/test_mintdb_deposits.c b/src/mintdb/test_mintdb_deposits.c index dbe12e88d..766bedd70 100644 --- a/src/mintdb/test_mintdb_deposits.c +++ b/src/mintdb/test_mintdb_deposits.c @@ -21,9 +21,11 @@ #include "platform.h" #include #include -#include "plugin.h" #include "taler_pq_lib.h" -#include "taler-mint-httpd.h" +#include "taler_mintdb_lib.h" +#include "taler_mintdb_plugin.h" + +#define MINT_CURRENCY "EUR" #define DB_URI "postgres:///taler" @@ -51,6 +53,10 @@ static int persistent; */ static int result; +/** + * The plugin. + */ +static struct TALER_MINTDB_Plugin *plugin; /** * Main function that will be run by the scheduler. @@ -77,7 +83,7 @@ run (void *cls, struct TALER_MINTDB_Session *session; deposit = NULL; - EXITIF (GNUNET_OK != TALER_MINT_plugin_load (cfg)); + EXITIF (NULL == (plugin = TALER_MINTDB_plugin_load (cfg))); EXITIF (GNUNET_OK != plugin->create_tables (plugin->cls, ! persistent)); @@ -98,8 +104,8 @@ run (void *cls, htonl (GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, UINT32_MAX)); deposit->amount_with_fee.fraction = htonl (GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK, UINT32_MAX)); - GNUNET_assert (strlen (TMH_MINT_CURRENCY) < sizeof (deposit->amount_with_fee.currency)); - strcpy (deposit->amount_with_fee.currency, TMH_MINT_CURRENCY); + GNUNET_assert (strlen (MINT_CURRENCY) < sizeof (deposit->amount_with_fee.currency)); + strcpy (deposit->amount_with_fee.currency, MINT_CURRENCY); /* Copy wireformat */ deposit->wire = json_loads (wire, 0, NULL); EXITIF (GNUNET_OK != @@ -114,7 +120,11 @@ run (void *cls, EXITIF_exit: GNUNET_free_non_null (deposit); - return; + if (NULL != plugin) + { + TALER_MINTDB_plugin_unload (plugin); + plugin = NULL; + } } -- cgit v1.2.3