diff options
author | Mark Michelson <mmichelson@digium.com> | 2008-10-31 20:05:46 +0000 |
---|---|---|
committer | Mark Michelson <mmichelson@digium.com> | 2008-10-31 20:05:46 +0000 |
commit | d521ad969600ecf7148cad19eb58197a5f563044 (patch) | |
tree | e8f75f4ce91647652c8eaec16c7afe3c7b0bcc5f /main/dial.c | |
parent | 5fe37e47c6a0f9a256e9e5668d2fd0f94d5c7504 (diff) |
* 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
Diffstat (limited to 'main/dial.c')
-rw-r--r-- | main/dial.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/main/dial.c b/main/dial.c index 54654a94a..e8c9ca221 100644 --- a/main/dial.c +++ b/main/dial.c @@ -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; |