Module: sip-router Branch: master Commit: 3c1b71be01bd2e6a7d92ea44e8157f718c6b7d95 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=3c1b71be...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: Tue Oct 4 22:34:35 2011 +0200
dialog(k): reset global dlg shortcut when destroying the structure
---
modules_k/dialog/dlg_hash.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/modules_k/dialog/dlg_hash.c b/modules_k/dialog/dlg_hash.c index 5795dbd..aa94b7e 100644 --- a/modules_k/dialog/dlg_hash.c +++ b/modules_k/dialog/dlg_hash.c @@ -200,6 +200,10 @@ inline void destroy_dlg(struct dlg_cell *dlg) run_dlg_callbacks( DLGCB_DESTROY , dlg, NULL, NULL, DLG_DIR_NONE, 0);
+ /* reset the global shortcut, if it is the case */ + if(current_dlg_pointer == dlg) + current_dlg_pointer = NULL; + /* delete the dialog from DB*/ if (dlg_db_mode) remove_dialog_from_db(dlg);