Skip to content

Commit

Permalink
dialog: Propagate new $DLG_timeout values to DB/BIN
Browse files Browse the repository at this point in the history
Make sure to store/replicate the new value, not the old one!

Credits to Vlad Patrascu for helping track this down
  • Loading branch information
liviuchircu committed Feb 28, 2019
1 parent 3175977 commit d948aa0
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions modules/dialog/dialog.c
Expand Up @@ -2019,11 +2019,6 @@ int pv_set_dlg_timeout(struct sip_msg *msg, pv_param_t *param,

dlg_unlock_dlg(dlg);

if (db_update)
update_dialog_timeout_info(dlg);
if (dialog_repl_cluster)
replicate_dialog_updated(dlg);

if (timer_update) {
switch ( update_dlg_timer(&dlg->tl, timeout) ) {
case -1:
Expand All @@ -2037,6 +2032,12 @@ int pv_set_dlg_timeout(struct sip_msg *msg, pv_param_t *param,
break;
}
}

if (db_update)
update_dialog_timeout_info(dlg);
if (dialog_repl_cluster)
replicate_dialog_updated(dlg);

} else {
LM_DBG("Set timeout for race condition dlg %.*s - ignoring\n",
dlg->callid.len,dlg->callid.s);
Expand Down

0 comments on commit d948aa0

Please sign in to comment.