[sr-dev] git:master: modules_k/pua: Fixed race hazards relating to RLS back-end SUBSCRIBEs

Peter Dunkley peter.dunkley at crocodile-rcs.com
Fri Jan 27 16:41:58 CET 2012


Module: sip-router
Branch: master
Commit: e627bc31776b521a1078b2a004e8ed179521cae2
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=e627bc31776b521a1078b2a004e8ed179521cae2

Author: pd <peter.dunkley at crocodile-rcs.com>
Committer: pd <peter.dunkley at crocodile-rcs.com>
Date:   Fri Jan 27 15:34:16 2012 +0000

modules_k/pua: Fixed race hazards relating to RLS back-end SUBSCRIBEs

- These resulted in the "no presence dialog record for non-TERMINATED state..."
  error message coming out of RLS a lot.
- When in DB only mode if we receive a back-end NOTIFY we look for a matching
  dialog.  If we don't find one we search the DB again for a matching temporary
  dialog.  You can get the situation where both DB queries fail because a 200
  OK to a SUBSCRIBE is processed and the dialog made "complete" between the
  two searches.  This is now fixed.
- On the sending side (for both hash table and DB only mode) you have can have
  two dialogs (one temporary and one full) stored for a short period of time.
  This is because the full dialog is written before the temporary one is
  deleted.  This can make the lookup when a back-end NOTIFY is received fail
  because only one record is expected.  This is now fixed - instead of
  inserting and then deleting we do a swap (while the hash table is locked) and
  an update operation on the DB.

---

 modules_k/pua/hash.c           |   48 +++++++---
 modules_k/pua/hash.h           |    1 +
 modules_k/pua/pua_db.c         |  200 +++++++++++++++++++++++++++++++++++-----
 modules_k/pua/pua_db.h         |    1 +
 modules_k/pua/send_subscribe.c |   45 ++++------
 5 files changed, 226 insertions(+), 69 deletions(-)

Diff:   http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commitdiff;h=e627bc31776b521a1078b2a004e8ed179521cae2



More information about the sr-dev mailing list