[asterisk-dev] [Code Review] 2361: Stasis application WebSocket support
David Lee
reviewboard at asterisk.org
Fri Apr 5 14:40:19 CDT 2013
> On April 5, 2013, 1:50 p.m., opticron wrote:
> > /trunk/res/res_stasis_websocket.c, line 147
> > <https://reviewboard.asterisk.org/r/2361/diff/9/?file=35480#file35480line147>
> >
> > Why is this not in the destructor code for stasis_ws_session_info?
Because of cyclic references. If you don't unregister from stasis-app, the destructor will never get called. I'll add a comment explaining why.
> On April 5, 2013, 1:50 p.m., opticron wrote:
> > /trunk/res/res_stasis_websocket.c, lines 132-133
> > <https://reviewboard.asterisk.org/r/2361/diff/9/?file=35480#file35480line132>
> >
> > Since having a container of strings seems to be popular lately and that's all websocket_apps is actually being used for, maybe pulling in ast_str_container_alloc from stasis-channel_events-take2 or stasis-bridge_events would be helpful.
If it were in its own branch, or in trunk, sure. But trying to pull just that from your branches into mine will make for a bigger merge headache than its worth. I can change this to ast_str_container_alloc once it's in a good state to do so.
- David
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/2361/#review8196
-----------------------------------------------------------
On April 5, 2013, 11:32 a.m., David Lee wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/2361/
> -----------------------------------------------------------
>
> (Updated April 5, 2013, 11:32 a.m.)
>
>
> Review request for Asterisk Developers.
>
>
> Repository: Asterisk
>
>
> Description
> -------
>
> This patch is based on the stasis-core message bus, in
> https://reviewboard.asterisk.org/r/2339/
>
> This is the API that binds the Stasis dialplan application to external
> Stasis applications. It also adds the beginnings of WebSocket
> application support.
>
> This module registers a dialplan function named Stasis, which is used
> to put a channel into the named Stasis app. As a channel enters and
> leaves the Stasis diaplan applcation, the Stasis app receives a
> 'stasis-start' and 'stasis-end' events.
>
> Stasis apps register themselves using the stasis_app_register and
> stasis_app_unregister functions. Messages are sent to an appliction
> using stasis_app_send.
>
> Finally, Stasis apps control channels through the use of the
> stasis_app_control object, and the family of stasis_app_control_*
> functions.
>
> The biggest unknown I have about this patch is how I'm exporting
> symbols from app_stasis.so. I believe I'm doing it correctly, and they
> should not need to use optional API. If anyone knows if it will be a
> problem on BSD, Solaris, etc., please let me know.
>
> Other changes along for the ride are:
> * An ast_frame_dtor function that's RAII_VAR safe
> * Some common JSON encoders for name/number, timeval, and
> context/extension/priority
>
>
> Diffs
> -----
>
> /trunk/apps/Makefile 384490
> /trunk/apps/app_stasis.c PRE-CREATION
> /trunk/apps/app_stasis.exports.in PRE-CREATION
> /trunk/apps/stasis_json.c PRE-CREATION
> /trunk/include/asterisk/app_stasis.h PRE-CREATION
> /trunk/include/asterisk/frame.h 384490
> /trunk/include/asterisk/json.h 384490
> /trunk/include/asterisk/localtime.h 384490
> /trunk/main/frame.c 384490
> /trunk/main/json.c 384490
> /trunk/res/res_stasis_websocket.c PRE-CREATION
> /trunk/tests/test_abstract_jb.c 384490
> /trunk/tests/test_app_stasis.c PRE-CREATION
> /trunk/tests/test_json.c 384490
>
> Diff: https://reviewboard.asterisk.org/r/2361/diff/
>
>
> Testing
> -------
>
> Unit tests; ran a few channels through the applications
>
>
> Thanks,
>
> David Lee
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20130405/81f03dbc/attachment.htm>
More information about the asterisk-dev
mailing list