From dfdca4e94cb9150d8cf0d73e368ecf0c0ebff685 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Sat, 11 Feb 2017 16:46:36 +0100 Subject: Back out early if we can't connect to postgres db --- src/backenddb/plugin_merchantdb_postgres.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') 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; -- cgit v1.2.3