diff options
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 182341b98..221409ac7 100644 --- a/src/datacache/plugin_datacache_postgres.c +++ b/src/datacache/plugin_datacache_postgres.c | |||
@@ -134,11 +134,12 @@ init_connection (struct Plugin *plugin) | |||
134 | PGresult *ret; | 134 | PGresult *ret; |
135 | 135 | ||
136 | /* Open database and precompile statements */ | 136 | /* Open database and precompile statements */ |
137 | conninfo = NULL; | 137 | if (GNUNET_OK != |
138 | GNUNET_CONFIGURATION_get_value_string (plugin->env->cfg, | 138 | GNUNET_CONFIGURATION_get_value_string (plugin->env->cfg, |
139 | "datacache-postgres", | 139 | "datacache-postgres", |
140 | "CONFIG", | 140 | "CONFIG", |
141 | &conninfo); | 141 | &conninfo)) |
142 | conninfo = NULL; | ||
142 | plugin->dbh = PQconnectdb (conninfo == NULL ? "" : conninfo); | 143 | plugin->dbh = PQconnectdb (conninfo == NULL ? "" : conninfo); |
143 | GNUNET_free_non_null (conninfo); | 144 | GNUNET_free_non_null (conninfo); |
144 | if (NULL == plugin->dbh) | 145 | if (NULL == plugin->dbh) |