[sr-dev] git:master: dialog(k): run event route after setting cfg dlg vars

Daniel-Constantin Mierla miconda at gmail.com
Thu Oct 18 09:56:42 CEST 2012


Module: sip-router
Branch: master
Commit: 2cdded28d9968a0b78f5ec8329ae6983d9ea77a9
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=2cdded28d9968a0b78f5ec8329ae6983d9ea77a9

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date:   Thu Oct 18 09:54:53 2012 +0200

dialog(k): run event route after setting cfg dlg vars

- in this way they (e.g., $DLG_lifetime) should be accessible in event
  route

---

 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 a6c1e3f..b350ba7 100644
--- a/modules_k/dialog/dlg_handlers.c
+++ b/modules_k/dialog/dlg_handlers.c
@@ -1186,12 +1186,13 @@ void dlg_onroute(struct sip_msg* req, str *route_params, void *param)
 	}
 
 	next_state_dlg( dlg, event, &old_state, &new_state, &unref);
-	dlg_run_event_route(dlg, req, old_state, new_state);
 
 	CURR_DLG_ID = req->id;
 	CURR_DLG_LIFETIME = (unsigned int)(time(0))-dlg->start_ts;
 	CURR_DLG_STATUS = new_state;
 
+	dlg_run_event_route(dlg, req, old_state, new_state);
+
 	/* delay deletion of dialog until transaction has died off in order
 	 * to absorb in-air messages */
 	if (new_state==DLG_STATE_DELETED && old_state!=DLG_STATE_DELETED) {




More information about the sr-dev mailing list