From: Christian Grothoff Date: Sat, 6 Nov 2010 13:59:07 +0000 (+0000) Subject: report config used X-Git-Tag: initial-import-from-subversion-38251~19811 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=a52c8618e6730de2ef885fb1a4c48d4a89d04cc6;p=oweals%2Fgnunet.git report config used --- diff --git a/src/datastore/plugin_datastore_postgres.c b/src/datastore/plugin_datastore_postgres.c index 54cfac3b3..aa92d7620 100644 --- a/src/datastore/plugin_datastore_postgres.c +++ b/src/datastore/plugin_datastore_postgres.c @@ -315,22 +315,25 @@ init_connection (struct Plugin *plugin) "CONFIG", &conninfo); plugin->dbh = PQconnectdb (conninfo == NULL ? "" : conninfo); - GNUNET_free_non_null (conninfo); if (NULL == plugin->dbh) { /* FIXME: warn about out-of-memory? */ + GNUNET_free_non_null (conninfo); return GNUNET_SYSERR; } if (PQstatus (plugin->dbh) != CONNECTION_OK) { GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, "datastore-postgres", - _("Unable to initialize Postgres: %s"), + _("Unable to initialize Postgres with configuration `%s': %s"), + conninfo, PQerrorMessage (plugin->dbh)); PQfinish (plugin->dbh); plugin->dbh = NULL; + GNUNET_free_non_null (conninfo); return GNUNET_SYSERR; } + GNUNET_free_non_null (conninfo); ret = PQexec (plugin->dbh, "CREATE TABLE gn090 (" " type INTEGER NOT NULL DEFAULT 0,"