Module: sip-router
Branch: 4.1
Commit: 4eb7b5b0d4b2d914f488d15d637e4448102d6d63
URL:    
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=4eb7b5b0d4b2d914f488d15d637e4448102d6d63

Author: Daniel-Constantin Mierla <[email protected]>
Committer: Daniel-Constantin Mierla <[email protected]>
Date:   Fri Jun 13 12:00:21 2014 +0200

dialog: backup and restore exiting route type when executing dialog event_route 
blocks

- reported by Nuno Miguel Reis

(cherry picked from commit 4fab97fb54334a55b1fce4e0d2f417fda5727c3a)

---

 modules/dialog/dlg_handlers.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/modules/dialog/dlg_handlers.c b/modules/dialog/dlg_handlers.c
index 21c4391..778f97b 100644
--- a/modules/dialog/dlg_handlers.c
+++ b/modules/dialog/dlg_handlers.c
@@ -1454,6 +1454,7 @@ void dlg_run_event_route(dlg_cell_t *dlg, sip_msg_t *msg, 
int ostate, int nstate
 {
        sip_msg_t *fmsg;
        int rt;
+       int bkroute;
 
        if(dlg==NULL)
                return;
@@ -1483,11 +1484,13 @@ void dlg_run_event_route(dlg_cell_t *dlg, sip_msg_t 
*msg, int ostate, int nstate
                dlg_ref(dlg, 1);
                dlg_set_ctx_iuid(dlg);
                LM_DBG("executing event_route %d on state %d\n", rt, nstate);
+               bkroute = get_route_type();
                set_route_type(LOCAL_ROUTE);
                run_top_route(event_rt.rlist[rt], fmsg, 0);
                dlg_reset_ctx_iuid();
                exec_post_script_cb(fmsg, LOCAL_CB_TYPE);
                dlg_unref(dlg, 1);
+               set_route_type(bkroute);
        }
 }
 


_______________________________________________
sr-dev mailing list
[email protected]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to