[asterisk-commits] tilghman: branch 1.4 r156386 - /branches/1.4/apps/app_dial.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Nov 12 15:18:58 CST 2008
Author: tilghman
Date: Wed Nov 12 15:18:57 2008
New Revision: 156386
URL: http://svn.digium.com/view/asterisk?view=rev&rev=156386
Log:
When using call limits under 1 second, infinite call lengths are allowed,
instead.
(closes issue #13851)
Reported by: ruddy
Modified:
branches/1.4/apps/app_dial.c
Modified: branches/1.4/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/apps/app_dial.c?view=diff&rev=156386&r1=156385&r2=156386
==============================================================================
--- branches/1.4/apps/app_dial.c (original)
+++ branches/1.4/apps/app_dial.c Wed Nov 12 15:18:57 2008
@@ -1744,6 +1744,9 @@
if (!res) {
if (calldurationlimit > 0) {
peer->whentohangup = time(NULL) + calldurationlimit;
+ } else if (timelimit > 0) {
+ /* Not enough granularity to make it less, but we can't use the special value 0 */
+ peer->whentohangup = time(NULL) + 1;
}
if (!ast_strlen_zero(dtmfcalled)) {
if (option_verbose > 2)
@@ -1851,7 +1854,7 @@
ast_log(LOG_DEBUG, "Exiting with DIALSTATUS=%s.\n", status);
if ((ast_test_flag(peerflags, OPT_GO_ON)) && (!chan->_softhangup) && (res != AST_PBX_KEEPALIVE)) {
- if (calldurationlimit)
+ if (timelimit)
chan->whentohangup = 0;
res = 0;
}
More information about the asterisk-commits
mailing list