Module: sip-router Branch: master Commit: edf61acb57ed5e8ee0ca9ec1f796e43ce993be48 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=edf61acb...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: Mon Feb 24 18:53:55 2014 +0100
dialog: remove dialog from profile as soon as gets to terminated state
---
modules/dialog/dlg_hash.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/modules/dialog/dlg_hash.c b/modules/dialog/dlg_hash.c index d346800..d8b2759 100644 --- a/modules/dialog/dlg_hash.c +++ b/modules/dialog/dlg_hash.c @@ -984,6 +984,13 @@ void next_state_dlg(dlg_cell_t *dlg, int event, } *new_state = dlg->state;
+ /* remove the dialog from profiles when is not no longer active */ + if(*new_state==DLG_STATE_DELETED && dlg->profile_links!=NULL + && *old_state!=*new_state) { + destroy_linkers(dlg->profile_links); + dlg->profile_links = NULL; + } + dlg_unlock( d_table, d_entry);
LM_DBG("dialog %p changed from state %d to "