Module: sip-router Branch: 4.1 Commit: 642428cf8be1c7355f91b14276e888ec505cd69a URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=642428cf...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: Mon May 19 08:56:38 2014 +0200
dialog: add wait-for-ack callback before response unref
- in case of a sipral for ending in a negative response from initial state, ack to second iteration can unref prematurely the dialog - reported by Pawel Sternal, FS#427
(cherry picked from commit d81fd1bf067b78b55ad348db2531c4ba9b10dddb)
---
modules/dialog/dlg_handlers.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/dialog/dlg_handlers.c b/modules/dialog/dlg_handlers.c index 9393d7f..239f442 100644 --- a/modules/dialog/dlg_handlers.c +++ b/modules/dialog/dlg_handlers.c @@ -543,6 +543,8 @@ static void dlg_onreply(struct cell* t, int type, struct tmcb_params *param) LM_DBG("dialog %p failed (negative reply)\n", dlg); /* dialog setup not completed (3456XX) */ run_dlg_callbacks( DLGCB_FAILED, dlg, req, rpl, DLG_DIR_UPSTREAM, 0); + if(dlg_wait_ack==1) + dlg_set_tm_waitack(t, dlg); /* do unref */ if (unref) dlg_unref(dlg, unref); @@ -551,8 +553,6 @@ static void dlg_onreply(struct cell* t, int type, struct tmcb_params *param)
if_update_stat(dlg_enable_stats, failed_dlgs, 1);
- if(dlg_wait_ack==1) - dlg_set_tm_waitack(t, dlg); goto done; }