mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-01 11:32:25 +00:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user