Browse Source

dialog: added prefix to global variable to reduce the risk of symbol conflict

Daniel-Constantin Mierla 11 years ago
parent
commit
b5993240da
2 changed files with 7 additions and 6 deletions
  1. 5 4
      modules/dialog/dialog.c
  2. 2 2
      modules/dialog/dlg_handlers.c

+ 5 - 4
modules/dialog/dialog.c

@@ -123,7 +123,7 @@ int active_dlgs_cnt = 0;
 int early_dlgs_cnt = 0;
 int early_dlgs_cnt = 0;
 int detect_spirals = 1;
 int detect_spirals = 1;
 int dlg_send_bye = 0;
 int dlg_send_bye = 0;
-int timeout_noreset = 0;
+int dlg_timeout_noreset = 0;
 stat_var *active_dlgs = 0;
 stat_var *active_dlgs = 0;
 stat_var *processed_dlgs = 0;
 stat_var *processed_dlgs = 0;
 stat_var *expired_dlgs = 0;
 stat_var *expired_dlgs = 0;
@@ -282,7 +282,7 @@ static param_export_t mod_params[]={
 	{ "xavp_cfg",              STR_PARAM, &dlg_xavp_cfg.s           },
 	{ "xavp_cfg",              STR_PARAM, &dlg_xavp_cfg.s           },
 	{ "ka_timer",              INT_PARAM, &dlg_ka_timer             },
 	{ "ka_timer",              INT_PARAM, &dlg_ka_timer             },
 	{ "ka_interval",           INT_PARAM, &dlg_ka_interval          },
 	{ "ka_interval",           INT_PARAM, &dlg_ka_interval          },
-	{ "timeout_noreset",       INT_PARAM, &timeout_noreset          },
+	{ "timeout_noreset",       INT_PARAM, &dlg_timeout_noreset      },
 	{ 0,0,0 }
 	{ 0,0,0 }
 };
 };
 
 
@@ -579,8 +579,9 @@ static int mod_init(void)
 		return -1;
 		return -1;
 	}
 	}
 
 
-	if (timeout_noreset != 0 && timeout_noreset != 1) {
-		LM_ERR("invalid value %d for timeout_noreset param!!\n",timeout_noreset);
+	if (dlg_timeout_noreset != 0 && dlg_timeout_noreset != 1) {
+		LM_ERR("invalid value %d for timeout_noreset param!!\n",
+				dlg_timeout_noreset);
 		return -1;
 		return -1;
 	}
 	}
 
 

+ 2 - 2
modules/dialog/dlg_handlers.c

@@ -82,7 +82,7 @@ static int       default_timeout;	/*!< default dialog timeout */
 static int       seq_match_mode;	/*!< dlg_match mode */ 
 static int       seq_match_mode;	/*!< dlg_match mode */ 
 static int       shutdown_done = 0;	/*!< 1 when destroy_dlg_handlers was called */
 static int       shutdown_done = 0;	/*!< 1 when destroy_dlg_handlers was called */
 extern int       detect_spirals;
 extern int       detect_spirals;
-extern int       timeout_noreset;
+extern int       dlg_timeout_noreset;
 extern int       initial_cbs_inscript;
 extern int       initial_cbs_inscript;
 extern int       dlg_send_bye;
 extern int       dlg_send_bye;
 extern int       dlg_event_rt[DLG_EVENTRT_MAX];
 extern int       dlg_event_rt[DLG_EVENTRT_MAX];
@@ -1259,7 +1259,7 @@ void dlg_onroute(struct sip_msg* req, str *route_params, void *param)
 		if (timeout!=default_timeout) {
 		if (timeout!=default_timeout) {
 			dlg->lifetime = timeout;
 			dlg->lifetime = timeout;
 		}
 		}
-		reset = !((dlg->iflags & DLG_IFLAG_TIMER_NORESET) || timeout_noreset);
+		reset = !((dlg->iflags & DLG_IFLAG_TIMER_NORESET) || dlg_timeout_noreset);
 
 
 		if ((new_state!=DLG_STATE_EARLY) && (old_state!=DLG_STATE_CONFIRMED || reset)) {
 		if ((new_state!=DLG_STATE_EARLY) && (old_state!=DLG_STATE_CONFIRMED || reset)) {
 			if (update_dlg_timer( &dlg->tl, dlg->lifetime )==-1) {
 			if (update_dlg_timer( &dlg->tl, dlg->lifetime )==-1) {