Module: sip-router Branch: kamailio_3.0 Commit: 1efaa9c19279a5dded570fb60621b45191d46027 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=1efaa9c1...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@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
---
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); } }