[asterisk-dev] [Code Review] 4338: res_pjsip_outbound_registration: Fix race condition with executing "pjsip show registrations" and reloading.

George Joseph reviewboard at asterisk.org
Wed Jan 14 13:32:56 CST 2015


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

Ship it!


Ship It!

- George Joseph


On Jan. 14, 2015, 12:28 p.m., Joshua Colp wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/4338/
> -----------------------------------------------------------
> 
> (Updated Jan. 14, 2015, 12:28 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> There exists a race condition with executing "pjsip show registrations" and reloading. This came to exist due to the splitting up of state information and configuration. Previously there was a guarantee that if you had the configuration you would also have the state. This is no longer true. When the "pjsip show registrations" CLI command is executed it grabs a container of the registration configuration at that point in time. It does NOT grab the state at that time. As each registration configuration is printed the underlying state can change or go away completely. The code in "pjsip show registrations" which printed out the information did not take this into account. It now does.
> 
> If an outbound registration is being printed but no state exists it is now skipped.
> 
> 
> Diffs
> -----
> 
>   /branches/13/res/res_pjsip_outbound_registration.c 430588 
> 
> Diff: https://reviewboard.asterisk.org/r/4338/diff/
> 
> 
> Testing
> -------
> 
> Ran show registrations and reloads over and over, still happy. Without patch this would sometimes crash.
> 
> 
> Thanks,
> 
> Joshua Colp
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20150114/3edfcda9/attachment-0001.html>


More information about the asterisk-dev mailing list