Module: sip-router
Branch: 3.2
Commit: 24eb7d2dbd1841b9e61c35f52b271431c49e911a
URL:    
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=24eb7d2dbd1841b9e61c35f52b271431c49e911a

Author: Timo Reimann <[email protected]>
Committer: Timo Reimann <[email protected]>
Date:   Thu Nov  3 23:10:38 2011 +0100

dialog(k): Set dialog parameters (timeout, etc.) before create callback
is executed to provide these parameters to registered functions.
(cherry picked from commit 987c8a5fbfa0f23e1211e4253e7113f4ea79b22b)

---

 modules_k/dialog/dlg_handlers.c |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/modules_k/dialog/dlg_handlers.c b/modules_k/dialog/dlg_handlers.c
index 701d80c..490501b 100644
--- a/modules_k/dialog/dlg_handlers.c
+++ b/modules_k/dialog/dlg_handlers.c
@@ -828,6 +828,15 @@ int dlg_new_dialog(struct sip_msg *req, struct cell *t, 
const int run_initial_cb
 
        link_dlg(dlg,0);
 
+       dlg->lifetime = get_dlg_timeout(req);
+       s.s   = _dlg_ctx.to_route_name;
+       s.len = strlen(s.s);
+       dlg_set_toroute(dlg, &s);
+       dlg->sflags |= _dlg_ctx.flags;
+
+       if (_dlg_ctx.to_bye!=0)
+               dlg->dflags |= DLG_FLAG_TOBYE;
+
     if (run_initial_cbs)  run_create_callbacks( dlg, req);
 
        /* first INVITE seen (dialog created, unconfirmed) */
@@ -840,15 +849,6 @@ int dlg_new_dialog(struct sip_msg *req, struct cell *t, 
const int run_initial_cb
        /* reference it once for current_dialog_pointer */
     ref_dlg(dlg, 1);
 
-       dlg->lifetime = get_dlg_timeout(req);
-       s.s   = _dlg_ctx.to_route_name;
-       s.len = strlen(s.s);
-       dlg_set_toroute(dlg, &s);
-       dlg->sflags |= _dlg_ctx.flags;
-
-       if (_dlg_ctx.to_bye!=0)
-               dlg->dflags |= DLG_FLAG_TOBYE;
-
     if_update_stat( dlg_enable_stats, processed_dlgs, 1);
 
 finish:


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

Reply via email to