[asterisk-dev] [Code Review] 3143: pjsip_configuration: in ast_sip_auth_array_init, change assert(auths->names == NULL) to ast_sip_auth_array_destroy(auths)

Joshua Colp reviewboard at asterisk.org
Fri Jan 24 07:53:11 CST 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/3143/#review10675
-----------------------------------------------------------

Ship it!


Ship It!

- Joshua Colp


On Jan. 20, 2014, 10:03 p.m., George Joseph wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/3143/
> -----------------------------------------------------------
> 
> (Updated Jan. 20, 2014, 10:03 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Bugs: ASTERISK-23168
>     https://issues.asterisk.org/jira/browse/ASTERISK-23168
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> Currently, ast_sip_auth_array_init asserts that auths->names is NULL effectively barfing if the array being initialized already contained auth names.  This works OK except where the sorcery object is derived from a template and the object tries to override the auth parameter.
> 
> Example:
> 
> [template](!)
> type=registration
> outbound_auth=someauth
> 
> [somereg](template)
> type=registration
> outbound_auth=someOTHERauth
> 
> Causes...
> ERROR[29423]: res_pjsip/pjsip_configuration.c:236 ast_sip_auth_array_init: FRACK!, Failed assertion auths->names == NULL (0)
> ERROR[29423]: res_pjsip/pjsip_configuration.c:237 ast_sip_auth_array_init: FRACK!, Failed assertion !auths->num (0)
> 
> This patch simply tests auths->names and if not null, calls ast_sip_auth_array_destroy before initializing the array with the new values.
> 
> 
> Diffs
> -----
> 
>   branches/12/res/res_pjsip/pjsip_configuration.c 405922 
> 
> Diff: https://reviewboard.asterisk.org/r/3143/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> George Joseph
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20140124/9a4d3663/attachment.html>


More information about the asterisk-dev mailing list