فهرست منبع

dialog(k): Set dialog parameters (timeout, etc.) before create callback
is executed to provide these parameters to registered functions.

Timo Reimann 14 سال پیش
والد
کامیت
987c8a5fbf
1فایلهای تغییر یافته به همراه9 افزوده شده و 9 حذف شده
  1. 9 9
      modules_k/dialog/dlg_handlers.c

+ 9 - 9
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: