[asterisk-commits] jpeeler: trunk r306432 - /trunk/main/manager.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Feb 4 16:37:16 CST 2011


Author: jpeeler
Date: Fri Feb  4 16:37:11 2011
New Revision: 306432

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=306432
Log:
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)

Modified:
    trunk/main/manager.c

Modified: trunk/main/manager.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/manager.c?view=diff&rev=306432&r1=306431&r2=306432
==============================================================================
--- trunk/main/manager.c (original)
+++ trunk/main/manager.c Fri Feb  4 16:37:11 2011
@@ -4069,11 +4069,12 @@
 	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;
 }
 




More information about the asterisk-commits mailing list