Filter out blacklisted manager events when using eventfilter.

Merging change from trunk in revision 306432.

(closes issue #19260)
Reported by: dhubbard
Tested by: dhubbard

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@318485 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Leif Madsen
2011-05-10 18:46:25 +00:00
parent 5578557df1
commit acb1bb3026

View File

@@ -4087,11 +4087,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;
}