[Pkg-clamav-commits] [SCM] Debian repository for ClamAV branch, debian/unstable, updated. debian/0.95+dfsg-1-6156-g094ec9b
Török Edvin
edwin at clamav.net
Sun Apr 4 01:22:23 UTC 2010
The following commit has been merged in the debian/unstable branch:
commit fed7cf9711d7cd6f5e877a71abc8102dcd7b1caf
Author: Török Edvin <edwin at clamav.net>
Date: Sun Mar 7 19:46:23 2010 +0200
shut up filter debug messages during DB load.
diff --git a/libclamav/filtering.c b/libclamav/filtering.c
index ca41091..f6e10d6 100644
--- a/libclamav/filtering.c
+++ b/libclamav/filtering.c
@@ -127,6 +127,13 @@
*
*/
+/*#define DETAILED_DEBUG*/
+#ifdef DETAILED_DEBUG
+#define detailed_dbg cli_dbgmsg
+#else
+#define detailed_dbg(...)
+#endif
+
#define BITMAP_CONTAINS(bmap, val) ((bmap)[(val) >> 5] & (1 << ((val) & 0x1f)))
#define BITMAP_INSERT(bmap, val) ((bmap)[(val) >> 5] |= (1 << ((val) & 0x1f)))
@@ -228,7 +235,7 @@ int filter_add_static(struct filter *m, const unsigned char *pattern, unsigned l
assert(best_pos < len-1);
if (pattern[best_pos] == 0 && pattern[best_pos+1] == 0) {
- cli_dbgmsg("!filter: subsignature begins with zero (static): %s\n", name);
+ detailed_dbg("filter (warning): subsignature begins with zero (static): %s\n", name);
}
pattern += best_pos;
len -= best_pos;
@@ -612,8 +619,7 @@ int filter_add_acpatt(struct filter *m, const struct cli_ac_patt *pat)
return -1;
}
assert(best_score_len >= 2);
-
- cli_dbgmsg("filter %s score: %ld, %u (+ %u)\n", pat->virname, (long)best_score, best_score_i, best_score_len);
+ detailed_dbg("filter %s score: %ld, %u (+ %u)\n", pat->virname, (long)best_score, best_score_i, best_score_len);
/* Shift-Or like preprocessing */
assert(1 < best_score_len);
for (i=0;i < best_score_len-1;i++) {
@@ -627,7 +633,7 @@ int filter_add_acpatt(struct filter *m, const struct cli_ac_patt *pat)
unsigned char c0 = spec_ith_char(spec0, k0);
unsigned char c1 = spec_ith_char(spec1, k1);
if (!c0 && !c1 && !i) {
- cli_dbgmsg("!filter: subsignature begins with zero: %s\n",pat->virname);
+ detailed_dbg("filter (warning): subsignature begins with zero: %s\n",pat->virname);
}
filter_set_atpos(m, i, c0 | (c1<<8));
}
@@ -640,7 +646,7 @@ int filter_add_acpatt(struct filter *m, const struct cli_ac_patt *pat)
unsigned char c0 = spec_ith_char(spec0, k0);
unsigned char c1 = spec_ith_char(spec1, k1);
if (!c0 && !c1) {
- cli_dbgmsg("filter: subsignature ends with zero: %s\n",pat->virname);
+ detailed_dbg("filter (warning): subsignature ends with zero: %s\n",pat->virname);
}
filter_set_end(m, j, c0 | (c1<<8));
}
diff --git a/libclamav/matcher-ac.c b/libclamav/matcher-ac.c
index 3cf7065..e495b95 100644
--- a/libclamav/matcher-ac.c
+++ b/libclamav/matcher-ac.c
@@ -360,7 +360,7 @@ int cli_ac_buildtrie(struct cli_matcher *root)
}
if (root->filter)
- cli_dbgmsg("!Using filter for trie %d\n", root->type);
+ cli_dbgmsg("Using filter for trie %d\n", root->type);
return ac_maketrans(root);
}
--
Debian repository for ClamAV
More information about the Pkg-clamav-commits
mailing list