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: https://origsvn.digium.com/svn/asterisk/trunk@306432 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
parent
a8aeb04a9f
commit
3d667d7c0f
|
@ -4069,11 +4069,12 @@ static int blackfilter_cmp_fn(void *obj, void *arg, void *data, int flags)
|
||||||
const char *eventdata = arg;
|
const char *eventdata = arg;
|
||||||
int *result = data;
|
int *result = data;
|
||||||
|
|
||||||
if (regexec(regex_filter, eventdata, 0, NULL, 0)) {
|
if (!regexec(regex_filter, eventdata, 0, NULL, 0)) {
|
||||||
*result = 1;
|
*result = 0;
|
||||||
return (CMP_MATCH | CMP_STOP);
|
return (CMP_MATCH | CMP_STOP);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
*result = 1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue