[sr-dev] git:3.2: dialog(k): refactored dlg ref counting

Daniel-Constantin Mierla miconda at gmail.com
Wed Nov 30 19:06:49 CET 2011


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

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date:   Mon Nov 21 23:52:43 2011 +0100

dialog(k): refactored dlg ref counting

- dlg pointer is no longer stored in tm callbacks parameter and ref
  counting for these kind of needs was removed
- the internal id (hash entry, dlg id) is given now to tm callbacks. The
  callbacks will do dlg lookup to get the structure
- there are longer-time persistent ref counting for:
  * storing dlg structure in dialog hash table
  * keeping dlg in timer list
  * waiting for the reply of BYE to destroy dialog structure
- all the other ref countings are for short time, only for the period of
  doing specific processing
- the new ref counting is safer in relation with tm callbacks and avoids
  tight dependecy which may have been easily broken by future tm changes
(cherry picked from commit 9ba4ee25e32368a9c17c3f86784a52a97b748b93)
(cherry picked from commit 5bdee1ffe820d3e9e75898bb252d1660b4bbad60)

---

 modules_k/dialog/dialog.c         |  102 +++++++----
 modules_k/dialog/dlg_db_handler.c |    8 +-
 modules_k/dialog/dlg_handlers.c   |  387 +++++++++++++++++++------------------
 modules_k/dialog/dlg_handlers.h   |   23 ++-
 modules_k/dialog/dlg_hash.c       |   60 +++++--
 modules_k/dialog/dlg_hash.h       |   73 +++++---
 modules_k/dialog/dlg_profile.c    |  145 ++++++---------
 modules_k/dialog/dlg_profile.h    |   44 ++---
 modules_k/dialog/dlg_req_within.c |   12 +-
 modules_k/dialog/dlg_timer.h      |    8 +-
 modules_k/dialog/dlg_var.c        |  338 ++++++++++++++++++++++----------
 modules_k/dialog/dlg_var.h        |   34 ++--
 12 files changed, 716 insertions(+), 518 deletions(-)

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



More information about the sr-dev mailing list