OSSP CVS Repository

ossp - Check-in [2161]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 2161
Date: 2002-May-28 14:19:47 (local)
2002-May-28 12:19:47 (UTC)
User:thl
Branch:
Comment: disable debug code blocks; request to enhance l2; FIXME/TODO statement
Tickets:
Inspections:
Files:
ossp-pkg/l2/TODO      1.54 -> 1.55     15 inserted, 0 deleted
ossp-pkg/lmtp2nntp/00TODO      1.59 -> 1.60     5 inserted, 0 deleted
ossp-pkg/lmtp2nntp/lmtp2nntp_msg.c      1.18 -> 1.19     13 inserted, 9 deleted

ossp-pkg/l2/TODO 1.54 -> 1.55

--- TODO 2002/01/03 16:21:20     1.54
+++ TODO 2002/05/28 12:19:47     1.55
@@ -1,6 +1,21 @@
 OSSP L2 TODO
 ============
 
+New Idea as thl discussed with rse a few minutes ago
+
+- l2 should calculate the global logging mask automatically based on
+  the OR'ing the masks of all output channels. This should increase
+  performance as useless requests are captured at an early stage.
+
+- l2 should provide a function to set the logging masks including
+  the global logging mask manually. This would require a mechanism
+  to re-calculate the maks at any time when manually set to 'auto'.
+
+- l2 should provide a function to get the logging masks including
+  the global logging mask. This could be used by the caller to
+  check if it is worth calling the actual log and allow him to
+  bypass wholly code blocks which exist for logging purposes only.
+
 Next steps:
 
 - libl2syslog:


ossp-pkg/lmtp2nntp/00TODO 1.59 -> 1.60

--- 00TODO       2002/05/23 05:52:53     1.59
+++ 00TODO       2002/05/28 12:19:47     1.60
@@ -5,6 +5,11 @@
   - check printf/log for consistent look'n'feel and uniqness
   - check printf/log for consistent usage of strerr()/XXX_error()
 
+  FIXMEs must be resolved to create a release.
+
+  TODOs are deferred for later releases. There're usually functional enhancements,
+  performance improvements, rewrites, integration of external libraries ...
+
   should we resolv on startup only or for every access or using dns ttl
 
   add --define foo:bar option allowing the user to specify arbitrary variables


ossp-pkg/lmtp2nntp/lmtp2nntp_msg.c 1.18 -> 1.19

--- lmtp2nntp_msg.c      2002/05/28 11:29:00     1.18
+++ lmtp2nntp_msg.c      2002/05/28 12:19:47     1.19
@@ -900,12 +900,13 @@
     if (ctx->option_firstheaderrule == NULL)
         return;
 
-    { //FIXME debug code block
+#if 0
+    { //TODO debug only - wait for l2 to support code block bypassing
         int i;
         headerrule_t *hrD;
         headerdata_t *hdD;
 
-        logbook(ctx->l2, L2_LEVEL_DEBUG, "FIXME trace ---------- headerrewrite() ----------");
+        logbook(ctx->l2, L2_LEVEL_DEBUG, "headerrewrite input");
         for (hrD = ctx->option_firstheaderrule; hrD != NULL; hrD = hrD->next)
             logbook(ctx->l2, L2_LEVEL_DEBUG, "hrD->header=%s", hrD->header);
         for (hdD = ctx->msg->hdFirst; hdD != NULL; hdD = hdD->next) {
@@ -918,6 +919,7 @@
                     logbook(ctx->l2, L2_LEVEL_DEBUG, "hdD->name:hdD->data.m[%d] %s %s", i, hdD->name, hdD->data.m[i]);
         }
     }
+#endif
     
     regex_ctx = (regex_ctx_t *)mallocex(sizeof(regex_ctx_t));
     regex_ctx->nMatch = 0;
@@ -933,12 +935,13 @@
         throw(0,0,0);
     }
     for (hrI = ctx->option_firstheaderrule; hrI != NULL; hrI = hrI->next) { /* for each rule */
-        { //FIXME debug code block
+#if 0
+        { //TODO debug only - wait for l2 to support code block bypassing
             int i;
             headerrule_t *hrD;
             headerdata_t *hdD;
 
-            logbook(ctx->l2, L2_LEVEL_DEBUG, "FIXME trace ---------- headerrewrite() ---------- MIDDLE");
+            logbook(ctx->l2, L2_LEVEL_DEBUG, "headerrewrite loop for each rule");
             for (hrD = ctx->option_firstheaderrule; hrD != NULL; hrD = hrD->next)
                 logbook(ctx->l2, L2_LEVEL_DEBUG, "hrD->header=%s", hrD->header);
             for (hdD = ctx->msg->hdFirst; hdD != NULL; hdD = hdD->next) {
@@ -952,6 +955,7 @@
                         logbook(ctx->l2, L2_LEVEL_DEBUG, "hdD->name:hdD->data.m[%d] %s %s", i, hdD->name, hdD->data.m[i]);
             }
         }
+#endif
         if (hrI->regex != NULL) {
             logbook(ctx->l2, L2_LEVEL_DEBUG, "rule has regex %s", hrI->regex);
             for (hdI = ctx->msg->hdFirst; hdI != NULL; hdI = hdI->next) { /* for each header */
@@ -1070,10 +1074,8 @@
             if (hdI != NULL) {
                 logbook(ctx->l2, L2_LEVEL_DEBUG, "replacing header %s", hrI->header);
                 headerreplace(hdI, hdNew);
-                if (hdNew->prev == NULL) {
-                    logbook(ctx->l2, L2_LEVEL_DEBUG, "FIXME trace #1");
+                if (hdNew->prev == NULL)
                     ctx->msg->hdFirst = hdNew;
-                }
             }
             else {
                 logbook(ctx->l2, L2_LEVEL_DEBUG, "appending header %s", hrI->header);
@@ -1084,12 +1086,13 @@
         }
     }
 
-    { //FIXME debug code block
+#if 0
+    { //TODO debug only - wait for l2 to support code block bypassing
         int i;
         headerrule_t *hrD;
         headerdata_t *hdD;
 
-        logbook(ctx->l2, L2_LEVEL_DEBUG, "FIXME trace ---------- headerrewrite() ---------- FINISH");
+        logbook(ctx->l2, L2_LEVEL_DEBUG, "headerrewrite output");
         for (hrD = ctx->option_firstheaderrule; hrD != NULL; hrD = hrD->next)
             logbook(ctx->l2, L2_LEVEL_DEBUG, "hrD->header=%s", hrD->header);
         for (hdD = ctx->msg->hdFirst; hdD != NULL; hdD = hdD->next) {
@@ -1102,4 +1105,5 @@
                     logbook(ctx->l2, L2_LEVEL_DEBUG, "hdD->name:hdD->data.m[%d] %s %s", i, hdD->name, hdD->data.m[i]);
         }
     }
+#endif
 }

CVSTrac 2.0.1