From: Sebastian Harl Date: Wed, 20 Mar 2013 07:03:42 +0000 (-0700) Subject: Use sdb_error_chomp() to remove newlines from multi-part messages. X-Git-Tag: sysdb-0.1.0~420 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=0e30e3dea2b303670cd7770e9607827a36f0cbfd;p=sysdb.git Use sdb_error_chomp() to remove newlines from multi-part messages. The actual logging callback should take care of handling that appropriately in these cases as well. --- diff --git a/src/daemon/config.c b/src/daemon/config.c index bb80d3b..ac95b6c 100644 --- a/src/daemon/config.c +++ b/src/daemon/config.c @@ -187,6 +187,7 @@ daemon_parse_config(const char *filename) sdb_error_append("\tUnknown option '%s' -- " "see the documentation for details\n", child->key); + sdb_error_chomp(); sdb_error_log(SDB_LOG_ERR); retval = -1; } diff --git a/src/utils/dbi.c b/src/utils/dbi.c index 5188058..f89e463 100644 --- a/src/utils/dbi.c +++ b/src/utils/dbi.c @@ -298,6 +298,7 @@ sdb_dbi_client_connect(sdb_dbi_client_t *client) driver = dbi_driver_list(driver)) { sdb_error_append("\t- %s\n", dbi_driver_get_name(driver)); } + sdb_error_chomp(); sdb_error_log(SDB_LOG_ERR); return -1; } @@ -327,6 +328,7 @@ sdb_dbi_client_connect(sdb_dbi_client_t *client) for (opt = dbi_conn_get_option_list(client->conn, NULL); opt; opt = dbi_conn_get_option_list(client->conn, opt)) sdb_error_append("\t- %s\n", opt); + sdb_error_chomp(); sdb_error_log(SDB_LOG_ERR); dbi_conn_close(client->conn);