Răsfoiți Sursa

modules/dialog: make dialog context available in event route tm:local-request

(cherry picked from commit 5002f66a98b6104702c8c862e7335ff189e7b7d8)
Federico Cabiddu 10 ani în urmă
părinte
comite
48b4261dd6
1 a modificat fișierele cu 5 adăugiri și 0 ștergeri
  1. 5 0
      modules/dialog/dlg_handlers.c

+ 5 - 0
modules/dialog/dlg_handlers.c

@@ -1402,8 +1402,13 @@ void dlg_ontimeout(struct dlg_tl *tl)
 
 		if(dlg->iflags&DLG_IFLAG_TIMEOUTBYE)
 		{
+			/* set the dialog context so that it's available in
+			 * tm:local-request event route */
+			dlg_set_ctx_iuid(dlg);
 			if(dlg_bye_all(dlg, NULL)<0)
 				dlg_unref(dlg, 1);
+			dlg_reset_ctx_iuid();	
+
 			/* run event route for end of dlg */
 			dlg_run_event_route(dlg, NULL, dlg->state, DLG_STATE_DELETED);