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

Joshua Colp reviewboard at asterisk.org
Thu Jan 15 06:09:56 CST 2015


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

(Updated Jan. 15, 2015, 6:09 a.m.)


Status
------

This change has been marked as submitted.


Review request for Asterisk Developers.


Changes
-------

Committed in revision 430664


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/20150115/286f976b/attachment.html>


More information about the asterisk-dev mailing list