diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-12-02 23:22:42 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-12-02 23:22:42 +0000 |
commit | 8df07be5253c602bb2c7e6043e4b4f6043ce1739 (patch) | |
tree | 7cae9cdd98dcc92ebf878d21d36ff92e7efdb3d1 /apps/app_dial.c | |
parent | 0f7703b694dbd4c71872fa8f2f7c0b93b189cd77 (diff) |
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
Diffstat (limited to 'apps/app_dial.c')
-rw-r--r-- | apps/app_dial.c | 7 |
1 files changed, 6 insertions, 1 deletions
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 = |