diff options
author | Christian Grothoff <christian@grothoff.org> | 2010-12-21 16:15:44 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2010-12-21 16:15:44 +0000 |
commit | 439d3cd69f7d187ac7ea6a30841175393a88a9aa (patch) | |
tree | 9b5a7638a7627ab2546047ef1d93bf9d6044481d /src/datacache/plugin_datacache_postgres.c | |
parent | 11695b40b6822c64748e5ca474274aff0397ae59 (diff) |
cleaner
Diffstat (limited to 'src/datacache/plugin_datacache_postgres.c')
-rw-r--r-- | src/datacache/plugin_datacache_postgres.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/datacache/plugin_datacache_postgres.c b/src/datacache/plugin_datacache_postgres.c index 182341b987..221409ac72 100644 --- a/src/datacache/plugin_datacache_postgres.c +++ b/src/datacache/plugin_datacache_postgres.c @@ -134,11 +134,12 @@ init_connection (struct Plugin *plugin) PGresult *ret; /* Open database and precompile statements */ - conninfo = NULL; - GNUNET_CONFIGURATION_get_value_string (plugin->env->cfg, - "datacache-postgres", - "CONFIG", - &conninfo); + if (GNUNET_OK != + GNUNET_CONFIGURATION_get_value_string (plugin->env->cfg, + "datacache-postgres", + "CONFIG", + &conninfo)) + conninfo = NULL; plugin->dbh = PQconnectdb (conninfo == NULL ? "" : conninfo); GNUNET_free_non_null (conninfo); if (NULL == plugin->dbh) |