[asterisk-dev] [Code Review] Stasis message router
Matt Jordan
reviewboard at asterisk.org
Thu Mar 14 13:32:39 CDT 2013
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/2390/#review8052
-----------------------------------------------------------
Ship it!
Hooray for deleting boilerplate code!
/trunk/main/stasis_message_router.c
<https://reviewboard.asterisk.org/r/2390/#comment15473>
We typically use \internal instead of \private to denote items that have translation unit scope.
- Matt
On March 14, 2013, 9:47 a.m., David Lee wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/2390/
> -----------------------------------------------------------
>
> (Updated March 14, 2013, 9:47 a.m.)
>
>
> Review request for Asterisk Developers and Matt Jordan.
>
>
> Summary
> -------
>
> Yesterday afternoon, mjordan and I were lamenting the way handling
> Stasis subscriptions meant that you had to write a cascading series of
> if-else statements. We also talked about the possability of needing to
> optimize how messages are handled in high-load scenarios.
>
> Enter the message router. A stasis_message_router is constructed for a
> particular stasis_topic, which is subscribes to. Call
> stasis_message_router_unsubscribe() to cancel that subscription.
>
> Once constructed, routes can be added using
> stasis_message_router_add() (or stasis_message_router_set_default()
> for any messages not handled by other routes). There may be only one
> route per stasis_message_type. The route's callback is invoked just as
> if it were a callback for a subscription; but it only gets called for
> messages of the specified type.
>
>
> Diffs
> -----
>
> /trunk/tests/test_stasis.c 383051
> /trunk/include/asterisk/stasis_message_router.h PRE-CREATION
> /trunk/main/stasis.c 383051
> /trunk/main/stasis_message_router.c PRE-CREATION
>
> Diff: https://reviewboard.asterisk.org/r/2390/diff
>
>
> Testing
> -------
>
> Unit testing.
>
>
> Thanks,
>
> David
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20130314/22f9f472/attachment.htm>
More information about the asterisk-dev
mailing list