From: VMware, Inc <> Date: Tue, 29 Mar 2011 20:25:44 +0000 (-0700) Subject: Fix wrong log level checks in tools syslogger. X-Git-Tag: 2011.03.28-387002~8 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=15c44f2b877d64bb89a561d5c7455260fc7420e7;p=thirdparty%2Fopen-vm-tools.git Fix wrong log level checks in tools syslogger. Signed-off-by: Marcelo Vanzin --- diff --git a/open-vm-tools/libvmtools/sysLogger.c b/open-vm-tools/libvmtools/sysLogger.c index 3fa36eda5..3bae66d13 100644 --- a/open-vm-tools/libvmtools/sysLogger.c +++ b/open-vm-tools/libvmtools/sysLogger.c @@ -68,15 +68,15 @@ VMSysLoggerLog(const gchar *domain, int priority; /* glib and syslog disagree about critical / error. */ - if (level | G_LOG_LEVEL_ERROR) { + if (level & G_LOG_LEVEL_ERROR) { priority = LOG_CRIT; - } else if (level | G_LOG_LEVEL_CRITICAL) { + } else if (level & G_LOG_LEVEL_CRITICAL) { priority = LOG_ERR; - } else if (level | G_LOG_LEVEL_WARNING) { + } else if (level & G_LOG_LEVEL_WARNING) { priority = LOG_WARNING; - } else if (level | G_LOG_LEVEL_MESSAGE) { + } else if (level & G_LOG_LEVEL_MESSAGE) { priority = LOG_NOTICE; - } else if (level | G_LOG_LEVEL_INFO) { + } else if (level & G_LOG_LEVEL_INFO) { priority = LOG_INFO; } else { priority = LOG_DEBUG;