From: Gabor X Toth <*@tg-x.net> Date: Wed, 12 Oct 2016 16:41:34 +0000 (+0000) Subject: log: add \n X-Git-Tag: initial-import-from-subversion-38251~121 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=7b0570f80f6d176f760fca0a79e439ee84e7c5a9;p=oweals%2Fgnunet.git log: add \n --- diff --git a/src/postgres/postgres.c b/src/postgres/postgres.c index 856031d75..4c8b2b046 100644 --- a/src/postgres/postgres.c +++ b/src/postgres/postgres.c @@ -43,10 +43,10 @@ int GNUNET_POSTGRES_check_result_ (PGconn *dbh, PGresult *ret, - int expected_status, + int expected_status, const char *command, - const char *args, - const char *filename, + const char *args, + const char *filename, int line) { if (ret == NULL) @@ -60,7 +60,7 @@ GNUNET_POSTGRES_check_result_ (PGconn *dbh, if (PQresultStatus (ret) != expected_status) { GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK, - "postgres", _("`%s:%s' failed at %s:%d with error: %s"), + "postgres", _("`%s:%s' failed at %s:%d with error: %s\n"), command, args, filename, line, PQerrorMessage (dbh)); PQclear (ret); return GNUNET_SYSERR; @@ -79,8 +79,8 @@ GNUNET_POSTGRES_check_result_ (PGconn *dbh, * @return #GNUNET_OK on success */ int -GNUNET_POSTGRES_exec_ (PGconn * dbh, - const char *sql, +GNUNET_POSTGRES_exec_ (PGconn * dbh, + const char *sql, const char *filename, int line) { @@ -109,25 +109,25 @@ GNUNET_POSTGRES_exec_ (PGconn * dbh, */ int GNUNET_POSTGRES_prepare_ (PGconn *dbh, - const char *name, + const char *name, const char *sql, - int nparams, - const char *filename, + int nparams, + const char *filename, int line) { PGresult *ret; ret = PQprepare (dbh, - name, - sql, + name, + sql, nparams, NULL); if (GNUNET_OK != - GNUNET_POSTGRES_check_result_ (dbh, - ret, + GNUNET_POSTGRES_check_result_ (dbh, + ret, PGRES_COMMAND_OK, "PQprepare", - sql, - filename, + sql, + filename, line)) return GNUNET_SYSERR; PQclear (ret); @@ -163,7 +163,7 @@ GNUNET_POSTGRES_connect (const struct GNUNET_CONFIGURATION_Handle * cfg, if (PQstatus (dbh) != CONNECTION_OK) { GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, "postgres", - _("Unable to initialize Postgres: %s"), + _("Unable to initialize Postgres: %s\n"), PQerrorMessage (dbh)); PQfinish (dbh); return NULL; @@ -182,7 +182,7 @@ GNUNET_POSTGRES_connect (const struct GNUNET_CONFIGURATION_Handle * cfg, * @return #GNUNET_OK on success */ int -GNUNET_POSTGRES_delete_by_rowid (PGconn * dbh, +GNUNET_POSTGRES_delete_by_rowid (PGconn * dbh, const char *stmt, uint32_t rowid) { @@ -193,15 +193,15 @@ GNUNET_POSTGRES_delete_by_rowid (PGconn * dbh, PGresult *ret; ret = - PQexecPrepared (dbh, stmt, 1, - paramValues, - paramLengths, - paramFormats, + PQexecPrepared (dbh, stmt, 1, + paramValues, + paramLengths, + paramFormats, 1); if (GNUNET_OK != - GNUNET_POSTGRES_check_result_ (dbh, ret, + GNUNET_POSTGRES_check_result_ (dbh, ret, PGRES_COMMAND_OK, - "PQexecPrepared", + "PQexecPrepared", "delrow", __FILE__, __LINE__))