Skip to content

Commit

Permalink
dialog: use a variable for timeout of dialogs in end state
Browse files Browse the repository at this point in the history
  • Loading branch information
miconda committed Nov 10, 2017
1 parent 74825c8 commit 313265a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/modules/dialog/dialog.c
Expand Up @@ -109,6 +109,7 @@ static int _dlg_track_cseq_updates = 0;
int dlg_ka_failed_limit = 1;
int dlg_early_timeout = 300;
int dlg_noack_timeout = 60;
int dlg_end_timeout = 300;

int dlg_enable_dmq = 0;

Expand Down Expand Up @@ -309,6 +310,7 @@ static param_export_t mod_params[]={
{ "event_callback", PARAM_STR, &dlg_event_callback },
{ "early_timeout", PARAM_INT, &dlg_early_timeout },
{ "noack_timeout", PARAM_INT, &dlg_noack_timeout },
{ "end_timeout", PARAM_INT, &dlg_end_timeout },
{ 0,0,0 }
};

Expand Down
3 changes: 2 additions & 1 deletion src/modules/dialog/dlg_hash.c
Expand Up @@ -50,6 +50,7 @@ extern int dlg_enable_dmq;

extern int dlg_early_timeout;
extern int dlg_noack_timeout;
extern int dlg_end_timeout;

/*! global dialog table */
struct dlg_table *d_table = 0;
Expand Down Expand Up @@ -249,7 +250,7 @@ int dlg_clean_run(ticks_t ti)
tdlg->dflags |= DLG_FLAG_CHANGED;
}
if(tdlg->state==DLG_STATE_DELETED && tdlg->end_ts>0
&& tdlg->end_ts<tm-300) {
&& tdlg->end_ts<tm-dlg_end_timeout) {
/* dialog in deleted state older than 5min */
LM_NOTICE("dialog in delete state is too old (%p ref %d)\n",
tdlg, tdlg->ref);
Expand Down

0 comments on commit 313265a

Please sign in to comment.