[asterisk-dev] [Code Review] 2481: stasis: Swap out old named ACL change events for stasis messages.

Matt Jordan reviewboard at asterisk.org
Mon Apr 29 18:21:19 CDT 2013


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



/trunk/main/named_acl.c
<https://reviewboard.asterisk.org/r/2481/#comment16195>

    Make name const



/trunk/main/named_acl.c
<https://reviewboard.asterisk.org/r/2481/#comment16194>

    You can RAII_VAR this as well:
    
    RAII_VAR(struct ast_json *, json_object, ast_json_object_create(), ast_json_unref);



/trunk/main/named_acl.c
<https://reviewboard.asterisk.org/r/2481/#comment16192>

    For the sake of simplicity, and because multi-line log messages can be more of a pain to parse, I'd remove the "Consumers of the ..." portion of this log message. The fact that you're telling them that an ACL change just failed implies that the consumers are generally in trouble.
    
    You can probably also remove 'stasis' from the messages. External users shouldn't know or care about Stasis in this context - they just need to know that the ACL changes are borked.


- Matt Jordan


On April 29, 2013, 8:15 p.m., jrose wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/2481/
> -----------------------------------------------------------
> 
> (Updated April 29, 2013, 8:15 p.m.)
> 
> 
> Review request for Asterisk Developers, David Lee, kmoore, and Matt Jordan.
> 
> 
> Bugs: ASTERISK-21103
>     https://issues.asterisk.org/jira/browse/ASTERISK-21103
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> This only covers one element of ASTERISK-21103 (of 3) and I started with this one because it's the one I'm most personally familiar with.
> The objective here was to remove the events issued by the named ACL system and replace them with stasis messages. Since ast_json structs
> aren't refcounted, I created a payload to contain them to act as the stasis message data component. Since the use of these events was very
> simple (the existing subscribers don't actually care about the data relayed by the events), it's an ideal starting point.
> 
> 
> Diffs
> -----
> 
>   /trunk/channels/chan_iax2.c 386859 
>   /trunk/channels/chan_sip.c 386859 
>   /trunk/include/asterisk/acl.h 386859 
>   /trunk/include/asterisk/event_defs.h 386859 
>   /trunk/include/asterisk/json.h 386859 
>   /trunk/main/json.c 386859 
>   /trunk/main/manager.c 386859 
>   /trunk/main/named_acl.c 386859 
> 
> Diff: https://reviewboard.asterisk.org/r/2481/diff/
> 
> 
> Testing
> -------
> 
> Made sure the stasis messages were being relayed and that my subscribers reacted to them.  chan_iax2, chan_sip, and manager all reloaded as expected when I performed 'module reload acl'.
> 
> 
> Thanks,
> 
> jrose
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20130429/2f7bb99c/attachment-0001.htm>


More information about the asterisk-dev mailing list