Browse code

fix prefiltering build.

Török Edvin authored on 2010/02/10 23:58:13
Showing 4 changed files
... ...
@@ -451,11 +451,11 @@ int  filter_add_acpatt(struct filter *m, const struct cli_ac_patt *pat)
451 451
 					spec->alt = pat->special_table[altcnt-1];
452 452
 					break;
453 453
 				    default:
454
+					stop = 1;
454 455
 					break;
455 456
 					/* TODO: should something be done here?
456 457
 					 * */
457 458
 				}
458
-				stop = 1;
459 459
 				break;
460 460
 			case CLI_MATCH_NIBBLE_HIGH:
461 461
 				spec->start = (p & 0xf0);
... ...
@@ -359,6 +359,8 @@ int cli_ac_buildtrie(struct cli_matcher *root)
359 359
 	return CL_SUCCESS;
360 360
     }
361 361
 
362
+    if (root->filter)
363
+	cli_warnmsg("Using filter for trie %d\n", root->type);
362 364
     return ac_maketrans(root);
363 365
 }
364 366
 
... ...
@@ -1693,6 +1695,7 @@ int cli_ac_addsig(struct cli_matcher *root, const char *virname, const char *hex
1693 1693
 	    mpool_free(root->mempool, root->filter);
1694 1694
 	    root->filter = NULL;
1695 1695
 	}
1696
+	/* TODO: should this affect maxpatlen? */
1696 1697
     }
1697 1698
 
1698 1699
     for(i = 0; i < root->ac_maxdepth && i < new->length; i++) {
... ...
@@ -70,6 +70,7 @@ int cli_bm_addpatt(struct cli_matcher *root, struct cli_bm_patt *pattern, const
70 70
 	    mpool_free(root->mempool, root->filter);
71 71
 	    root->filter = NULL;
72 72
 	}
73
+	/* TODO: should this affect maxpatlen? */
73 74
     }
74 75
 
75 76
 #if BM_MIN_LENGTH == BM_BLOCK_SIZE
... ...
@@ -34,6 +34,7 @@
34 34
 #else
35 35
 /*TODO: maybe we need a GCC version check too here */
36 36
 #include <pthread.h>
37
+#include <assert.h>
37 38
 #include "cltypes.h"
38 39
 
39 40
 enum perf_log_sumable {