[asterisk-dev] [Code Review] Add regular expression blacklist filtering for manager events

Mark Michelson mmichelson at digium.com
Fri May 21 00:09:05 CDT 2010



> On 2010-05-21 00:06:31, Mark Michelson wrote:
> > /trunk/main/manager.c, line 3653
> > <https://reviewboard.asterisk.org/r/673/diff/2/?file=10342#file10342line3653>
> >
> >     The logic in this if statement seems to be reversed. match_filter returns 1 if there is a match, and this if statement appears to send the event if match_filter returns 0.

After looking at the original bug report, I see now that this is what is intended. Please document this!


- Mark


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/673/#review2052
-----------------------------------------------------------


On 2010-05-20 18:42:50, Jeff Peeler wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/673/
> -----------------------------------------------------------
> 
> (Updated 2010-05-20 18:42:50)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> From the submitter:
> to allow better filtering of ami-events than configuring categories, I created an option "eventfilter" for manager-users. Events to be sent are matched against regexes specified in these options and are discarded if the regex matches (blacklisting).
> 
> 
> This addresses bug 14861.
>     https://issues.asterisk.org/view.php?id=14861
> 
> 
> Diffs
> -----
> 
>   /trunk/main/manager.c 264829 
> 
> Diff: https://reviewboard.asterisk.org/r/673/diff
> 
> 
> Testing
> -------
> 
> I ensured manager events are reported the same without filtering and works as expected with.
> 
> 
> Thanks,
> 
> Jeff
> 
>




More information about the asterisk-dev mailing list