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: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@160393 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Tilghman Lesher
2008-12-02 23:22:42 +00:00
parent d6effd3f11
commit 452f1f9c0d

View File

@@ -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 =