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

Kevin Harwell reviewboard at asterisk.org
Tue Sep 24 11:53:29 CDT 2013


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

(Updated Sept. 24, 2013, 11:53 a.m.)


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


Changes
-------

Addressed review issues.


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 (updated)
-----

  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/20130924/15168b79/attachment-0001.html>


More information about the asterisk-dev mailing list