aboutsummaryrefslogtreecommitdiff
path: root/src/postgres/postgres.c
diff options
context:
space:
mode:
authorGabor X Toth <*@tg-x.net>2016-10-12 16:41:34 +0000
committerGabor X Toth <*@tg-x.net>2016-10-12 16:41:34 +0000
commit7b0570f80f6d176f760fca0a79e439ee84e7c5a9 (patch)
tree1b0da2077e1bebf03593fee4f64ad930d9b0b3ab /src/postgres/postgres.c
parent15c9fcd0f8110e515da3a34aaa6ac2778ff4cfb6 (diff)
log: add \n
Diffstat (limited to 'src/postgres/postgres.c')
-rw-r--r--src/postgres/postgres.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/src/postgres/postgres.c b/src/postgres/postgres.c
index 856031d759..4c8b2b0468 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__))