[asterisk-dev] [Code Review] 2509: Remove required type field from channel blobs

Matt Jordan reviewboard at asterisk.org
Wed May 8 11:33:16 CDT 2013


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

Ship it!


There are a number of reviews and items currently in process that need this work (and, in fact, this was spawned because of them). For that reason, I'm going to recommend that this gets committed ASAP, so that the rest of this work isn't held up.


/trunk/include/asterisk/stasis.h
<https://reviewboard.asterisk.org/r/2509/#comment16426>

    For the macro names, I'd probably throw in a MSG, just to be clear that we aren't talking about topics here


- Matt Jordan


On May 8, 2013, 4:24 p.m., David Lee wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/2509/
> -----------------------------------------------------------
> 
> (Updated May 8, 2013, 4:24 p.m.)
> 
> 
> Review request for Asterisk Developers, Matt Jordan, opticron, and Jason Parker.
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> When we first introduced the channel blob types, the JSON blobs were
> self identifying by a required "type" field in the JSON object
> itself. This, as it turns out, was a bad idea.
> 
> When we introduced the message router, it was useless for routing based
> on the JSON type. And messages had two type fields to check: the
> stasis_message_type() of the message itself, plus the type field in the
> JSON blob (but only if it was a blob message).
> 
> This patch corrects that mistake by removing the required type field
> from JSON blobs, and introducing first class stasis_message_type objects
> for the actual message type.
> 
> Since we now will have a proliferation of message types, I introduced a
> few macros to help reduce the amount of boilerplate necessary to set
> them up.
> 
> Review: https://reviewboard.asterisk.org/r/2509
> 
> 
> Diffs
> -----
> 
>   /trunk/apps/app_userevent.c 387968 
>   /trunk/include/asterisk/stasis.h 387968 
>   /trunk/include/asterisk/stasis_channels.h 387968 
>   /trunk/main/channel.c 387968 
>   /trunk/main/manager_channels.c 387968 
>   /trunk/main/stasis_channels.c 387968 
>   /trunk/res/res_stasis.c 387968 
>   /trunk/tests/test_stasis_channels.c 387968 
> 
> Diff: https://reviewboard.asterisk.org/r/2509/diff/
> 
> 
> Testing
> -------
> 
> Ran unit tests; verified Manager events still looked sane when making a call.
> 
> 
> Thanks,
> 
> David Lee
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20130508/c7b38092/attachment.htm>


More information about the asterisk-dev mailing list