mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-25 06:00:36 +00:00
* Fixed timeout logic in the dialing API as setting timeouts
had no effect * Updated dialing API documentation to indicate that timeouts are specified in milliseconds * Added a new timeout argument to the Page application. If time expires, any endpoints which have not answered will be hung up. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@153223 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1038,7 +1038,7 @@ void ast_dial_set_global_timeout(struct ast_dial *dial, int timeout)
|
||||
{
|
||||
dial->timeout = timeout;
|
||||
|
||||
if (dial->timeout > 0 && dial->actual_timeout > dial->timeout)
|
||||
if (dial->timeout > 0 && (dial->actual_timeout > dial->timeout || dial->actual_timeout == -1))
|
||||
dial->actual_timeout = dial->timeout;
|
||||
|
||||
return;
|
||||
@@ -1059,7 +1059,7 @@ void ast_dial_set_timeout(struct ast_dial *dial, int num, int timeout)
|
||||
|
||||
channel->timeout = timeout;
|
||||
|
||||
if (channel->timeout > 0 && dial->actual_timeout > channel->timeout)
|
||||
if (channel->timeout > 0 && (dial->actual_timeout > channel->timeout || dial->actual_timeout == -1))
|
||||
dial->actual_timeout = channel->timeout;
|
||||
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user