[asterisk-dev] [Code Review] 2860: pjsip: race condition in registrar

svnbot reviewboard at asterisk.org
Thu Sep 26 13:48:29 CDT 2013


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

(Updated Sept. 26, 2013, 1:48 p.m.)


Status
------

This change has been marked as submitted.


Review request for Asterisk Developers, Joshua Colp and Mark Michelson.


Changes
-------

Committed in revision 399897


Bugs: AST-1213
    https://issues.asterisk.org/jira/browse/AST-1213


Repository: Asterisk


Description
-------

While handling a registration request a race condition could occur if/when two+ clients registered at the same time.  This happened when one request obtained a copy of the current contacts for an AOR and another request did the same before the first request updated.  Thus the second would update and overwrite the first (or vice-versa depending on which actually updated first).  In the case of it being the same contact two "add" events would be raised.

pjsip registration handling is now serialized to alleviate this issue.


Diffs
-----

  branches/12/include/asterisk/res_pjsip.h 399658 
  branches/12/res/res_pjsip.exports.in 399658 
  branches/12/res/res_pjsip/security_events.c 399658 
  branches/12/res/res_pjsip_registrar.c 399658 

Diff: https://reviewboard.asterisk.org/r/2860/diff/


Testing
-------

Had a few phones register themselves with asterisk using pjsip registration.  Also ran all the pjsip registration testsuite tests and made sure they all passed.


Thanks,

Kevin Harwell

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20130926/ea5600a5/attachment-0002.html>


More information about the asterisk-dev mailing list