]> sourceware.org Git - newlib-cygwin.git/commitdiff
* syslog.cc (setlogmask): Don't mask the mask.
authorCorinna Vinschen <corinna@vinschen.de>
Thu, 10 Nov 2005 10:34:49 +0000 (10:34 +0000)
committerCorinna Vinschen <corinna@vinschen.de>
Thu, 10 Nov 2005 10:34:49 +0000 (10:34 +0000)
(vsyslog): Fix priority check.

winsup/cygwin/ChangeLog
winsup/cygwin/syslog.cc

index 7f32ab0a5deafe4dda40af7c31f18d74283fd01f..27448aa6c86c5eeae7e4d2e0775eda32c2d464f9 100644 (file)
@@ -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.
index 1a56f0758ac0ffc9921e745caef1083c6597002a..a4beaea74158a460ca0cd4d7debe9aa268738ba3 100644 (file)
@@ -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);
This page took 0.035958 seconds and 5 git commands to generate.