Module: sip-router Branch: 3.3 Commit: 3d7623ecb9533c7f66053e871c13b50ecce59855 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=3d7623ec...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@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 (cherry picked from commit 2cdded28d9968a0b78f5ec8329ae6983d9ea77a9)
---
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) {