summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2017-02-11 16:46:36 +0100
committerFlorian Dold <florian.dold@gmail.com>2017-02-11 16:46:36 +0100
commitdfdca4e94cb9150d8cf0d73e368ecf0c0ebff685 (patch)
tree50718e530025cf8035218a4a5f371998a5de8b07
parentc892b808b20abfdc64d3e7fb6a39402f3099cc09 (diff)
downloadmerchant-dfdca4e94cb9150d8cf0d73e368ecf0c0ebff685.tar.gz
merchant-dfdca4e94cb9150d8cf0d73e368ecf0c0ebff685.tar.bz2
merchant-dfdca4e94cb9150d8cf0d73e368ecf0c0ebff685.zip
Back out early if we can't connect to postgres db
-rw-r--r--src/backenddb/plugin_merchantdb_postgres.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/backenddb/plugin_merchantdb_postgres.c b/src/backenddb/plugin_merchantdb_postgres.c
index 1c479029..28459248 100644
--- a/src/backenddb/plugin_merchantdb_postgres.c
+++ b/src/backenddb/plugin_merchantdb_postgres.c
@@ -1363,6 +1363,11 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
}
}
pg->conn = GNUNET_POSTGRES_connect (cfg, "merchantdb-postgres");
+ if (NULL == pg->conn)
+ {
+ GNUNET_break (0);
+ return NULL;
+ }
plugin = GNUNET_new (struct TALER_MERCHANTDB_Plugin);
plugin->cls = pg;
plugin->drop_tables = &postgres_drop_tables;