Permalink
Browse files

action_filter bugfix

  • Loading branch information...
1 parent d02444d commit 47faf10bef4b08fce7060440338c89e4c5e0c58b @jvehent committed Nov 6, 2011
Showing with 7 additions and 3 deletions.
  1. +7 −3 postscreen_stats.py
View
@@ -58,18 +58,22 @@ def __init__(self):
# return true if the object matches the ACTION_FILTER
def action_filter(self,filter):
_pass_action_filter = 0
+ _and_action_filter = 0
# if the ACTION_FILTER is defined, iterate through the action
# and process only the clients with a matching action
if filter == None:
_pass_action_filter = 1
else:
for or_action in filter.split("|"):
if _pass_action_filter == 0:
+ _and_action_filter = 0
for and_action in or_action.split("&"):
- if self.actions[and_action] > 0 and _pass_action_filter >= 0:
- _pass_action_filter = 1
+ if self.actions[and_action] > 0 and _and_action_filter >= 0:
+ _and_action_filter = 1
else:
- _pass_action_filter = -1
+ _and_action_filter = -1
+ if _and_action_filter > 0:
+ _pass_action_filter = 1
if _pass_action_filter == 1:
return True
return False

0 comments on commit 47faf10

Please sign in to comment.