[asterisk-dev] [Code Review] 2509: Remove required type field from channel blobs
svnbot
reviewboard at asterisk.org
Wed May 8 13:34:53 CDT 2013
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/2509/
-----------------------------------------------------------
(Updated May 8, 2013, 1:34 p.m.)
Status
------
This change has been marked as submitted.
Review request for Asterisk Developers, Matt Jordan, opticron, and Jason Parker.
Changes
-------
Committed in revision 388005
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/0ae5dc84/attachment-0001.htm>
More information about the asterisk-dev
mailing list