From 8df07be5253c602bb2c7e6043e4b4f6043ce1739 Mon Sep 17 00:00:00 2001 From: tilghman Date: Tue, 2 Dec 2008 23:22:42 +0000 Subject: Merged revisions 156388 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ................ r156388 | tilghman | 2008-11-12 15:34:51 -0600 (Wed, 12 Nov 2008) | 12 lines Merged revisions 156386 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r156386 | tilghman | 2008-11-12 15:18:57 -0600 (Wed, 12 Nov 2008) | 5 lines When using call limits under 1 second, infinite call lengths are allowed, instead. (closes issue #13851) Reported by: ruddy ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@160393 f38db490-d61c-443f-a65b-d21fe96a405b --- apps/app_dial.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'apps') diff --git a/apps/app_dial.c b/apps/app_dial.c index ce2bffeb3..52d8ed31e 100644 --- a/apps/app_dial.c +++ b/apps/app_dial.c @@ -957,7 +957,12 @@ static int do_timelimit(struct ast_channel *chan, struct ast_bridge_config *conf *calldurationlimit = 0; /* more efficient to do it like S(x) does since no advanced opts */ if (!config->play_warning && !config->start_sound && !config->end_sound && config->timelimit) { - *calldurationlimit = config->timelimit / 1000; + if (config->timelimit > 1000) { + *calldurationlimit = config->timelimit / 1000; + } else if (config->timelimit > 0) { + /* Not enough granularity to make it less, but we can't use the special value 0 */ + *calldurationlimit = 1; + } ast_verb(3, "Setting call duration limit to %d seconds.\n", *calldurationlimit); config->timelimit = play_to_caller = play_to_callee = -- cgit v1.2.3