aboutsummaryrefslogtreecommitdiff
path: root/src/mint/taler-mint-reservemod.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mint/taler-mint-reservemod.c')
-rw-r--r--src/mint/taler-mint-reservemod.c27
1 files changed, 18 insertions, 9 deletions
diff --git a/src/mint/taler-mint-reservemod.c b/src/mint/taler-mint-reservemod.c
index 48a9c88b4..b2129d261 100644
--- a/src/mint/taler-mint-reservemod.c
+++ b/src/mint/taler-mint-reservemod.c
@@ -27,10 +27,14 @@
27#include "taler_util.h" 27#include "taler_util.h"
28#include "taler_signatures.h" 28#include "taler_signatures.h"
29#include "mint.h" 29#include "mint.h"
30#include "mint_db.h"
31
32char *mintdir;
30 33
31static char *mintdir;
32static struct GNUNET_CRYPTO_EddsaPublicKey *reserve_pub; 34static struct GNUNET_CRYPTO_EddsaPublicKey *reserve_pub;
33static struct GNUNET_CONFIGURATION_Handle *kcfg; 35
36struct GNUNET_CONFIGURATION_Handle *cfg;
37
34static PGconn *db_conn; 38static PGconn *db_conn;
35 39
36 40
@@ -169,22 +173,27 @@ main (int argc, char *const *argv)
169 173
170 reserve_pub = GNUNET_new (struct GNUNET_CRYPTO_EddsaPublicKey); 174 reserve_pub = GNUNET_new (struct GNUNET_CRYPTO_EddsaPublicKey);
171 if ((NULL == reserve_pub_str) || 175 if ((NULL == reserve_pub_str) ||
172 (GNUNET_OK != GNUNET_STRINGS_string_to_data (reserve_pub_str, 176 (GNUNET_OK !=
173 strlen (reserve_pub_str), 177 GNUNET_STRINGS_string_to_data (reserve_pub_str,
174 reserve_pub, 178 strlen (reserve_pub_str),
175 sizeof (struct GNUNET_CRYPTO_EddsaPublicKey)))) 179 reserve_pub,
180 sizeof (struct GNUNET_CRYPTO_EddsaPublicKey))))
176 { 181 {
177 fprintf (stderr, "reserve key invalid\n"); 182 fprintf (stderr, "reserve key invalid\n");
178 return 1; 183 return 1;
179 } 184 }
180 185
181 kcfg = TALER_config_load (mintdir); 186 cfg = TALER_config_load (mintdir);
182 if (NULL == kcfg) 187 if (NULL == cfg)
183 { 188 {
184 fprintf (stderr, "can't load mint configuration\n"); 189 fprintf (stderr, "can't load mint configuration\n");
185 return 1; 190 return 1;
186 } 191 }
187 if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_string (kcfg, "mint", "db", &TALER_MINT_db_connection_cfg_str)) 192 if (GNUNET_OK !=
193 GNUNET_CONFIGURATION_get_value_string (cfg,
194 "mint",
195 "db",
196 &TALER_MINT_db_connection_cfg_str))
188 { 197 {
189 fprintf (stderr, "db configuration string not found\n"); 198 fprintf (stderr, "db configuration string not found\n");
190 return 42; 199 return 42;