aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2005-11-10 10:34:49 +0000
committerCorinna Vinschen <corinna@vinschen.de>2005-11-10 10:34:49 +0000
commit2d5067835e01adec14730f58aa116e12e27ef379 (patch)
treecee0864cda02fcfce286387880ebe05d355923f7
parent03ea3f832ebe9cd69f0e7f73cb490e18c894f2ce (diff)
downloadnewlib-2d5067835e01adec14730f58aa116e12e27ef379.zip
newlib-2d5067835e01adec14730f58aa116e12e27ef379.tar.gz
newlib-2d5067835e01adec14730f58aa116e12e27ef379.tar.bz2
* syslog.cc (setlogmask): Don't mask the mask.
(vsyslog): Fix priority check.
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/syslog.cc4
2 files changed, 7 insertions, 2 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 7f32ab0..27448aa 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,8 @@
+2005-11-09 Corinna Vinschen <corinna@vinschen.de>
+
+ * syslog.cc (setlogmask): Don't mask the mask.
+ (vsyslog): Fix priority check.
+
2005-11-09 Scott Finneran <scottf@pacom.com>
* include/cygwin/signal.h: Add missing sigrelse prototype.
diff --git a/winsup/cygwin/syslog.cc b/winsup/cygwin/syslog.cc
index 1a56f07..a4beaea 100644
--- a/winsup/cygwin/syslog.cc
+++ b/winsup/cygwin/syslog.cc
@@ -79,7 +79,7 @@ setlogmask (int maskpri)
return _my_tls.locals.process_logmask;
int old_mask = _my_tls.locals.process_logmask;
- _my_tls.locals.process_logmask = maskpri & LOG_PRIMASK;
+ _my_tls.locals.process_logmask = maskpri;
return old_mask;
}
@@ -263,7 +263,7 @@ vsyslog (int priority, const char *message, va_list ap)
{
debug_printf ("%x %s", priority, message);
/* If the priority fails the current mask, reject */
- if (((priority & LOG_PRIMASK) & _my_tls.locals.process_logmask) == 0)
+ if ((LOG_MASK (LOG_PRI (priority)) & _my_tls.locals.process_logmask) == 0)
{
debug_printf ("failing message %x due to priority mask %x",
priority, _my_tls.locals.process_logmask);