Module: sip-router Branch: 3.1 Commit: 8ff999c7641bf08f0e6d52a14d1f612511525eb3 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=8ff999c7...
Author: Timo Reimann timo.reimann@1und1.de Committer: Timo Reimann timo.reimann@1und1.de Date: Thu Aug 25 15:17:48 2011 +0200
modules_k/dialog: Simplify and refactor parts of reference counter handling.
- Remove special handling for dialogs in the "deleted" state to allow accessing such dialogs (e.g., from the configuration script). Besides making the code easier to understand, this also fixes a bug where the reference counter would be decremented after detecting a spiral (dlg_handlers.c) even though get_dlg() does not increment it for "deleted" dialogs. - Adapt interfaces for lookup_dlg() and get_dlg() accordingly, i.e., remove "del" parameter and update in-code documentation. - Replace direct increments on a dialog structure's ref variable by calls to ref_dlg_unsafe(). - Move {un}ref_dlg_unsafe() definitions towards the head of the file to make declaration available earlier. - Improve store_dlg_in_tm(): * Return and evaluate result code. * Replace second register call by passing unreference_dialog() as release function to the first register call. - Document various places in the code dealing with reference counting. (cherry picked from commit f44534cbe841046079e176512b04a6b9c5a68bdc)
Conflicts:
modules_k/dialog/dlg_handlers.c modules_k/dialog/dlg_hash.c modules_k/dialog/dlg_hash.h
---
modules_k/dialog/dialog.c | 5 +- modules_k/dialog/dlg_handlers.c | 97 +++++++-------------------- modules_k/dialog/dlg_hash.c | 133 ++++++++++++++++--------------------- modules_k/dialog/dlg_hash.h | 11 ++- modules_k/dialog/dlg_profile.c | 3 + modules_k/dialog/dlg_req_within.c | 2 +- 6 files changed, 96 insertions(+), 155 deletions(-)
Diff: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commitdiff;h=8ff9...