[asterisk-commits] wdoekes: trunk r406618 - in /trunk: ./ configs/ main/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Jan 27 02:17:26 CST 2014
Author: wdoekes
Date: Mon Jan 27 02:17:22 2014
New Revision: 406618
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=406618
Log:
manager: The eventfilter= option now takes an extended regex.
In pre-trunk versions (...12) it accepts a basic regex, which is
confusing because all other regexes in asterisk are of the
extended kind.
Review: https://reviewboard.asterisk.org/r/3147/
Modified:
trunk/UPGRADE.txt
trunk/configs/manager.conf.sample
trunk/main/manager.c
Modified: trunk/UPGRADE.txt
URL: http://svnview.digium.com/svn/asterisk/trunk/UPGRADE.txt?view=diff&rev=406618&r1=406617&r2=406618
==============================================================================
--- trunk/UPGRADE.txt (original)
+++ trunk/UPGRADE.txt Mon Jan 27 02:17:22 2014
@@ -47,5 +47,8 @@
again set the root console verbose level and affect the verbose level
logged.
+ - The manager.conf 'eventfilter' now takes an "extended" regular expression
+ instead of a "basic" one.
+
===========================================================
===========================================================
Modified: trunk/configs/manager.conf.sample
URL: http://svnview.digium.com/svn/asterisk/trunk/configs/manager.conf.sample?view=diff&rev=406618&r1=406617&r2=406618
==============================================================================
--- trunk/configs/manager.conf.sample (original)
+++ trunk/configs/manager.conf.sample Mon Jan 27 02:17:22 2014
@@ -94,13 +94,14 @@
; user.
;
;eventfilter=Event: Newchannel
-;eventfilter=!Channel: DAHDI.*
+;eventfilter=Channel: (PJ)?SIP/(james|jim|john)-
+;eventfilter=!Channel: DAHDI/
; The eventfilter option is used to whitelist or blacklist events per user.
-; A filter consists of a (basic/old-style and unanchored) regular expression
-; that is run on the entire event data. If the first character of the filter
-; is an exclamation mark (!), the filter is appended to the blacklist instead
-; of the whitelist. After first checking the read access below, the regular
-; expression filters are processed as follows:
+; A filter consists of an (unanchored) regular expression that is run on the
+; entire event data. If the first character of the filter is an exclamation
+; mark (!), the filter is appended to the blacklist instead of the whitelist.
+; After first checking the read access below, the regular expression filters
+; are processed as follows:
; - If no filters are configured all events are reported as normal.
; - If there are white filters only: implied black all filter processed first,
; then white filters.
Modified: trunk/main/manager.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/manager.c?view=diff&rev=406618&r1=406617&r2=406618
==============================================================================
--- trunk/main/manager.c (original)
+++ trunk/main/manager.c Mon Jan 27 02:17:22 2014
@@ -5121,7 +5121,7 @@
is_blackfilter = 0;
}
- if (regcomp(new_filter, filter_pattern, 0)) { /* XXX: the only place we use non-REG_EXTENDED */
+ if (regcomp(new_filter, filter_pattern, REG_EXTENDED | REG_NOSUB)) {
ao2_t_ref(new_filter, -1, "failed to make regex");
return FILTER_COMPILE_FAIL;
}
More information about the asterisk-commits
mailing list