Module: sip-router Branch: treimann/3.1/robust_ref_count Commit: fa6f1ae06e1e3ece9e2497871b5b021be0730258 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=fa6f1ae0...
Author: Timo Reimann timo.reimann@1und1.de Committer: Timo Reimann timo.reimann@1und1.de Date: Fri Aug 26 15:33:49 2011 +0200
modules_k/dialog: Robustify reference counting.
- Remove special handling for dialogs in the "deleted" state to allow accessing such dialogs (e.g., from the configuration script). As a side effect, this also removes a bug where the reference counter would be decremented after detecting a spiral (dlg_handlers.c) although 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 sooner. - Improve store_dlg_in_tm(): * Return and evaluate result code. * Replace second register call by specifying a release function to the first register call. - Document various places in the code dealing with reference counter. (cherry picked from commit 37f9ff35e47a6ed6e4037ca09430115f0b4d6df4)
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=fa6f...