-
- Downloads
Remove required type field from channel blobs
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 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@388005 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Showing
- apps/app_userevent.c 2 additions, 2 deletionsapps/app_userevent.c
- include/asterisk/stasis.h 37 additions, 0 deletionsinclude/asterisk/stasis.h
- include/asterisk/stasis_channels.h 58 additions, 50 deletionsinclude/asterisk/stasis_channels.h
- main/channel.c 12 additions, 17 deletionsmain/channel.c
- main/manager_channels.c 39 additions, 36 deletionsmain/manager_channels.c
- main/stasis_channels.c 32 additions, 67 deletionsmain/stasis_channels.c
- res/res_stasis.c 10 additions, 13 deletionsres/res_stasis.c
- tests/test_stasis_channels.c 48 additions, 16 deletionstests/test_stasis_channels.c
Loading
Please register or sign in to comment