Module: sip-router
Branch: sr_3.0
Commit: 63b457cf35abf32d3dbdbf4390a11d4a265e6825
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=63b457c…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Fri Nov 6 13:57:22 2009 +0100
dialog(k): set dlg context after pre script callback
- applies for the case of timeout route
- the prescript callback resets it otherwise
- reported by Nathan Angelacos, SF svn # 5927
(cherry picked from commit 1efaa9c19279a5dded570fb60621b45191d46027)
---
modules_k/dialog/dlg_handlers.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/modules_k/dialog/dlg_handlers.c b/modules_k/dialog/dlg_handlers.c
index 491a1f1..cd19708 100644
--- a/modules_k/dialog/dlg_handlers.c
+++ b/modules_k/dialog/dlg_handlers.c
@@ -967,13 +967,14 @@ void dlg_ontimeout( struct dlg_tl *tl)
if(dlg->toroute>0 && dlg->toroute<main_rt.entries
&& main_rt.rlist[dlg->toroute]!=NULL)
{
- dlg_set_ctx_dialog(dlg);
fmsg = faked_msg_next();
if (exec_pre_script_cb(fmsg, REQUEST_CB_TYPE)>0)
{
+ dlg_set_ctx_dialog(dlg);
LM_DBG("executing route %d on timeout\n", dlg->toroute);
set_route_type(REQUEST_ROUTE);
run_top_route(main_rt.rlist[dlg->toroute], fmsg, 0);
+ dlg_set_ctx_dialog(0);
exec_post_script_cb(fmsg, REQUEST_CB_TYPE);
}
}