[asterisk-dev] [Code Review] 2579: Add vtable and methods for to_json and to_ami for Stasis messages
svnbot
reviewboard at asterisk.org
Tue Jun 11 10:46:42 CDT 2013
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/2579/
-----------------------------------------------------------
(Updated June 11, 2013, 10:46 a.m.)
Status
------
This change has been marked as submitted.
Review request for Asterisk Developers, Matt Jordan and Jason Parker.
Changes
-------
Committed in revision 391403
Bugs: ASTERISK-21817
https://issues.asterisk.org/jira/browse/ASTERISK-21817
Repository: Asterisk
Description
-------
When a Stasis message type is defined in a loadable module, handling
those messages for AMI and res_stasis events can be cumbersome.
This patch adds a vtable to stasis_message_type, with to_ami and
to_json virtual functions. These allow messages to be handled
abstractly without putting module-specific code in core.
As an example, the VarSet AMI event was refactored to use the to_ami
virtual function.
Diffs
-----
/trunk/tests/test_stasis_channels.c 390151
/trunk/tests/test_stasis.c 390151
/trunk/main/stasis_message.c 390151
/trunk/main/stasis_channels.c 390151
/trunk/main/parking.c 390151
/trunk/main/manager_channels.c 390151
/trunk/main/manager.c 390151
/trunk/include/asterisk/stasis.h 390151
/trunk/apps/confbridge/confbridge_manager.c 390151
Diff: https://reviewboard.asterisk.org/r/2579/diff/
Testing
-------
Unit tests.
Verified that the VarSet event still looked the way it ought to.
Thanks,
David Lee
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20130611/c46eee2a/attachment.htm>
More information about the asterisk-dev
mailing list