gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r17297 - gnunet/src/util


From: gnunet
Subject: [GNUnet-SVN] r17297 - gnunet/src/util
Date: Sun, 9 Oct 2011 11:28:02 +0200

Author: grothoff
Date: 2011-10-09 11:28:02 +0200 (Sun, 09 Oct 2011)
New Revision: 17297

Modified:
   gnunet/src/util/common_logging.c
Log:
LRN: Fix logdef processing logic

Now if logdef matches, it is used to both allow AND restrict the call.



Modified: gnunet/src/util/common_logging.c
===================================================================
--- gnunet/src/util/common_logging.c    2011-10-09 08:55:21 UTC (rev 17296)
+++ gnunet/src/util/common_logging.c    2011-10-09 09:28:02 UTC (rev 17297)
@@ -317,7 +317,6 @@
   int i;
   int force_only;
   size_t strlen_file;
-  int matches = 0;
 
   if (comp == NULL)
     /* Use default component */
@@ -344,19 +343,11 @@
         (ld->function == NULL || strcmp (function, ld->function) == 0)
        )
     {
-      /* This definition matched! */
-      matches += 1;
-      /* And if it allows the call to be made, then we're finished */
-      if (caller_level <= ld->level)
-        return 1;
+      /* We're finished */
+      return caller_level <= ld->level;
     }
   }
-  /* If some definitions did match, but had too low loglevel to allow logging,
-   * don't check any further.
-   */
-  if (matches > 0)
-    return 0;
-  /* Otherwise use global level, if defined */
+  /* No matches - use global level, if defined */
   if (min_level >= 0)
     return caller_level <= min_level;
   /* All programs/services previously defaulted to WARNING.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]