Module: sip-router Branch: master Commit: b5993240da29f1c13a2900ecf479f95973afd599 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=b5993240...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: Wed Jan 8 18:23:04 2014 +0100
dialog: added prefix to global variable to reduce the risk of symbol conflict
---
modules/dialog/dialog.c | 9 +++++---- modules/dialog/dlg_handlers.c | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/modules/dialog/dialog.c b/modules/dialog/dialog.c index 4072981..307b90f 100644 --- a/modules/dialog/dialog.c +++ b/modules/dialog/dialog.c @@ -123,7 +123,7 @@ int active_dlgs_cnt = 0; int early_dlgs_cnt = 0; int detect_spirals = 1; int dlg_send_bye = 0; -int timeout_noreset = 0; +int dlg_timeout_noreset = 0; stat_var *active_dlgs = 0; stat_var *processed_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 }, { "ka_timer", INT_PARAM, &dlg_ka_timer }, { "ka_interval", INT_PARAM, &dlg_ka_interval }, - { "timeout_noreset", INT_PARAM, &timeout_noreset }, + { "timeout_noreset", INT_PARAM, &dlg_timeout_noreset }, { 0,0,0 } };
@@ -579,8 +579,9 @@ static int mod_init(void) 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; }
diff --git a/modules/dialog/dlg_handlers.c b/modules/dialog/dlg_handlers.c index 590e894..44bbc12 100644 --- a/modules/dialog/dlg_handlers.c +++ b/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 shutdown_done = 0; /*!< 1 when destroy_dlg_handlers was called */ extern int detect_spirals; -extern int timeout_noreset; +extern int dlg_timeout_noreset; extern int initial_cbs_inscript; extern int dlg_send_bye; 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) { 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 (update_dlg_timer( &dlg->tl, dlg->lifetime )==-1) {