dect
/
asterisk
Archived
13
0
Fork 0

Send manager event for blackfilter only if it DOES NOT match.

The logic got reversed, oops. Works properly now when multiple blackfilters are
present.

(closes issue #18283)
Reported by: telecos82
Patches: 
      ast_managereventfilter.patch uploaded by telecos82 (license 687)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@306432 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
jpeeler 2011-02-04 22:37:11 +00:00
parent 6df0404cd7
commit d5b0b5036b
1 changed files with 3 additions and 2 deletions

View File

@ -4069,11 +4069,12 @@ static int blackfilter_cmp_fn(void *obj, void *arg, void *data, int flags)
const char *eventdata = arg;
int *result = data;
if (regexec(regex_filter, eventdata, 0, NULL, 0)) {
*result = 1;
if (!regexec(regex_filter, eventdata, 0, NULL, 0)) {
*result = 0;
return (CMP_MATCH | CMP_STOP);
}
*result = 1;
return 0;
}