OSSP CVS Repository

ossp - Difference in ossp-pkg/fsl/fsl.c versions 1.19 and 1.20
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/fsl/fsl.c 1.19 -> 1.20

--- fsl.c        2002/07/24 07:57:04     1.19
+++ fsl.c        2002/07/24 09:45:12     1.20
@@ -318,7 +318,7 @@
     argl2spec = getenv("FSL_DEBUG");
     if (argl2spec == NULL)
         argl2spec = FSL_DEBUG;
-    if (strlen(argl2spec) != NULL) {
+    if (strlen(argl2spec) != 0) {
         if ((l2rv = l2_env_create(&ctx.l2_fslenv)) != L2_OK) {
             cp = l2_env_strerror(ctx.l2_fslenv, l2rv); fsldebug(L2_LEVEL_ERROR, "failed to create L2 environment (%d) for fsl\n", l2rv); CU(1); }
         if ((l2rv = l2_env_levels(ctx.l2_fslenv, L2_LEVEL_ALL, L2_LEVEL_NONE)) != L2_OK) {
@@ -344,6 +344,7 @@
     */
 
     /* create default sysloglevel to l2_level mapping */
+    fsldebug(L2_LEVEL_DEBUG, "create default sysloglevel to l2_level mapping\n");
     for (i = 0; sysloglevel2string[i].string != NULL; i++);
     if ((ctx.levelmap = (levelmap_t *)malloc(i * sizeof(levelmap_t))) == NULL) {
         fsldebug(L2_LEVEL_ERROR, "Error: malloc() failed\n"); CU(1); }
@@ -411,8 +412,6 @@
     if ((cfgrv = cfg_node_get(cfg, cfgseq, CFG_NODE_ATTR_CHILD1, &cfgdir)) != CFG_OK) {
         (void)cfg_error(cfg, cfgrv, &cp); fsldebug(L2_LEVEL_ERROR, "cfg_node_get(CFG_NODE_ATTR_CHILD1) failed with error %s (%d)\n", cp, cfgrv); CU(1); }
     while (cfgdir != NULL) {
-        fsldebug(L2_LEVEL_DEBUG, "cfgdir=0x%.8lx\n", (unsigned long)cfgdir);
-
         /*  check if operating on a directive */
         if ((cfgrv = cfg_node_get(cfg, cfgdir, CFG_NODE_ATTR_TYPE, &cfgtype)) != CFG_OK) {
             (void)cfg_error(cfg, cfgrv, &cp); fsldebug(L2_LEVEL_ERROR, "cfg_node_get(CFG_NODE_ATTR_TYPE) failed with error %s (%d)\n", cp, cfgrv); CU(1); }
@@ -489,7 +488,7 @@
                     fsldebug(L2_LEVEL_ERROR, "pcre_study() failed with error %s\n", cpError); CU(1); }
 
                 nMatch = pcre_exec(pcreRegex, pcreExtra, cpISF, strlen(cpISF), 0, 0, ovec, OVECSIZE);
-                fsldebug(L2_LEVEL_DEBUG, "nMatch=%d when \"%s\" is used against \"%s\"\n", nMatch, argmatch, cpISF);
+                fsldebug(L2_LEVEL_TRACE, "nMatch=%d when \"%s\" is used against \"%s\"\n", nMatch, argmatch, cpISF);
                 if (nMatch >= 1) {
                     pcre_get_substring_list(cpISF, ovec, nMatch, &acpMatch);
                     if (acpMatch != NULL)
@@ -742,7 +741,7 @@
 
     if (filename == NULL || buffer == NULL)
         CU(FSL_ERR_ARG);
-    fsldebug(L2_LEVEL_DEBUG, "appendfiletobuffer(..., %s)\n", filename);
+    fsldebug(L2_LEVEL_TRACE, "appendfiletobuffer(), filename=%s)\n", filename);
 
     if ((fd = open(filename, O_RDONLY)) == -1)
         CU(FSL_ERR_SYS);

CVSTrac 2.0.1