-
- /* Checking if the number of matches worked */
- if(currently_rule->__frequency < currently_rule->frequency)
- {
- if(currently_rule->__frequency <= 10)
- {
- currently_rule->last_events[currently_rule->__frequency]
- = lf->full_log;
- currently_rule->last_events[currently_rule->__frequency+1]
- = NULL;
- }
-
- currently_rule->__frequency++;
+ /* We avoid multiple triggers for the same rule
+ * or rules with a lower level.
+ */
+ else if (lf->matched >= rule->level) {
+ return (NULL);
+ }
+
+
+
+
+ /* Check if the number of matches worked */
+ if (rule->__frequency < rule->frequency) {
+ if (rule->__frequency <= 10) {
+ rule->last_events[rule->__frequency]
+ = lf->full_log;
+ rule->last_events[rule->__frequency + 1]
+ = NULL;
+ }
+
+ rule->__frequency++;