From acb1bb3026c486f2febfc89fd2ce1b033f744cea Mon Sep 17 00:00:00 2001 From: Leif Madsen Date: Tue, 10 May 2011 18:46:25 +0000 Subject: [PATCH] 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 --- main/manager.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main/manager.c b/main/manager.c index a3cb0a9d9c..315d0e6755 100644 --- a/main/manager.c +++ b/main/manager.c @@ -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; }