]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Filter out blacklisted manager events when using eventfilter.
authorLeif Madsen <leif@leifmadsen.com>
Tue, 10 May 2011 18:46:25 +0000 (18:46 +0000)
committerLeif Madsen <leif@leifmadsen.com>
Tue, 10 May 2011 18:46:25 +0000 (18:46 +0000)
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

index a3cb0a9d9cc519c15e6a704669e399d3a9234f17..315d0e6755a23bcc3acdb2457c7783719851badb 100644 (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;
 }