From: Sebastian Harl Date: Thu, 6 Feb 2014 19:17:09 +0000 (+0100) Subject: frontend: Don't send debug logs to the client (for now). X-Git-Tag: sysdb-0.1.0~214 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=f578f9621aa645ea20c4cd027aeda802f9346f12;p=sysdb.git frontend: Don't send debug logs to the client (for now). Later, this should be configurable by the client at runtime. --- diff --git a/src/frontend/connection.c b/src/frontend/connection.c index 4ba12dc..b48de2c 100644 --- a/src/frontend/connection.c +++ b/src/frontend/connection.c @@ -206,7 +206,7 @@ sdb_conn_get_ctx(void) * Send a log message originating from the current thread to the client. */ static int -connection_log(int __attribute__((unused)) prio, const char *msg, +connection_log(int prio, const char *msg, sdb_object_t __attribute__((unused)) *user_data) { sdb_conn_t *conn; @@ -217,6 +217,10 @@ connection_log(int __attribute__((unused)) prio, const char *msg, if ((! conn) || (! conn->username)) return 0; + /* XXX: make the log-level configurable by the client at runtime */ + if (prio >= SDB_LOG_DEBUG) + return 0; + /* TODO: Use CONNECTION_LOG_? */ if (sdb_connection_send(conn, CONNECTION_LOG, (uint32_t)strlen(msg), msg) < 0)