[asterisk-dev] [Code Review] 2903: Update vector API to be more flexible.
Matt Jordan
reviewboard at asterisk.org
Fri Nov 1 09:24:10 CDT 2013
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/2903/#review10096
-----------------------------------------------------------
Ship it!
Ship It!
- Matt Jordan
On Oct. 22, 2013, 6:02 p.m., rmudgett wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/2903/
> -----------------------------------------------------------
>
> (Updated Oct. 22, 2013, 6:02 p.m.)
>
>
> Review request for Asterisk Developers.
>
>
> Repository: Asterisk
>
>
> Description
> -------
>
> Made the vector macro API be more like linked lists.
> 1) Added a name parameter to ast_vector() to name the vector struct.
> 2) Made the API take a pointer to the vector struct instead of the struct itself.
> 3) Added an element cleanup macro/function parameter when removing an element from the vector for ast_vector_remove_cmp_unordered() and ast_vector_remove_elem_unordered().
> 4) Added ast_vector_get_addr() in the case the vector element is not a simple pointer.
>
> I did not change the vector API macros to all uppercase to indicate that they are macros though it should be done.
>
> * Converted an inline vector usage in stasis_message_router to use the vector API. It needed the API improvements so it could be converted.
>
> * Fixed topic reference leak in router_dtor() when the stasis_message_router is destroyed.
>
> * Fixed deadlock potential in stasis_forward_all() and stasis_forward_cancel(). Locking two topics at the same time requires deadlock avoidance.
>
> * Made internal_stasis_subscribe() tolerant of a NULL topic.
>
> * Made stasis_message_router_add(), stasis_message_router_add_cache_update(), stasis_message_router_remove(), and stasis_message_router_remove_cache_update() tolerant of a NULL message_type.
>
> * Promoted a LOG_DEBUG message to LOG_ERROR as intended in dispatch_message().
>
>
> Diffs
> -----
>
> /branches/12/main/stasis_message_router.c 401432
> /branches/12/main/stasis.c 401432
> /branches/12/include/asterisk/vector.h 401432
> /branches/12/include/asterisk/lock.h 401432
>
> Diff: https://reviewboard.asterisk.org/r/2903/diff/
>
>
> Testing
> -------
>
> The stasis unit tests still pass.
>
>
> Thanks,
>
> rmudgett
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20131101/7b536671/attachment-0001.html>
More information about the asterisk-dev
mailing list