Module: kamailio Branch: 4.2 Commit: a01849a60533e3b60dab71f1a3a632ae4b84f831 URL: https://github.com/kamailio/kamailio/commit/a01849a60533e3b60dab71f1a3a632ae4b84f831
Author: Daniel-Constantin Mierla <[email protected]> Committer: Daniel-Constantin Mierla <[email protected]> Date: 2015-01-09T14:15:19+01:00 dialog: proper handling of dlg_set_timeout() for not confirmed dialogs (cherry picked from commit a41eab6bedf670f9f34f069b82a85c3a49c5e1bd) --- Modified: modules/dialog/dlg_hash.c --- Diff: https://github.com/kamailio/kamailio/commit/a01849a60533e3b60dab71f1a3a632ae4b84f831.diff Patch: https://github.com/kamailio/kamailio/commit/a01849a60533e3b60dab71f1a3a632ae4b84f831.patch --- diff --git a/modules/dialog/dlg_hash.c b/modules/dialog/dlg_hash.c index 09166b8..4ac2a34 100644 --- a/modules/dialog/dlg_hash.c +++ b/modules/dialog/dlg_hash.c @@ -1097,12 +1097,14 @@ int dlg_set_toroute(struct dlg_cell *dlg, str *route) int update_dlg_timeout(dlg_cell_t *dlg, int timeout) { - if(update_dlg_timer(&dlg->tl, timeout) < 0) { - LM_ERR("failed to update dialog lifetime\n"); - dlg_release(dlg); - return -1; - } - + if(dlg->state!=DLG_STATE_UNCONFIRMED + && dlg->state!=DLG_STATE_EARLY) { + if(update_dlg_timer(&dlg->tl, timeout) < 0) { + LM_ERR("failed to update dialog lifetime\n"); + dlg_release(dlg); + return -1; + } + } dlg->lifetime = timeout; dlg->dflags |= DLG_FLAG_CHANGED; _______________________________________________ sr-dev mailing list [email protected] http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
