From 623c62d339e532328c68c40c3b32d9f64f935073 Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Wed, 21 Apr 2010 17:51:50 +0000 Subject: [PATCH] IET r219: Fixed log_debug to properly evaluate logging level. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1640 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- iscsi-scst/usr/iscsi_scstd.c | 2 +- iscsi-scst/usr/log.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/iscsi-scst/usr/iscsi_scstd.c b/iscsi-scst/usr/iscsi_scstd.c index d6bbdd868..fd22b6986 100644 --- a/iscsi-scst/usr/iscsi_scstd.c +++ b/iscsi-scst/usr/iscsi_scstd.c @@ -557,7 +557,7 @@ static void event_loop(void) event_conn(conn, pollfd); if (conn->state == STATE_CLOSE) { - log_debug(0, "closing conn %p", conn); + log_debug(1, "closing conn %p", conn); conn_free_pdu(conn); close(pollfd->fd); pollfd->fd = -1; diff --git a/iscsi-scst/usr/log.c b/iscsi-scst/usr/log.c index 9af524ae9..57d86425c 100644 --- a/iscsi-scst/usr/log.c +++ b/iscsi-scst/usr/log.c @@ -107,7 +107,7 @@ void __log_error(const char *func, int line, const char *fmt, ...) void __log_debug(const char *func, int line, int level, const char *fmt, ...) { - if (log_level > level) { + if (log_level >= level) { va_list ap; va_start(ap, fmt); dolog(LOG_DEBUG, func, line, fmt, ap);