Module: sip-router
Branch: master
Commit: 5bdee1ffe820d3e9e75898bb252d1660b4bbad60
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=5bdee1f…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)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)
---
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=5bd…