diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-12-13 23:22:02 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-12-13 23:22:02 +0000 |
commit | 99242855ed2cf8b8056cd34a82801f6f1a579c83 (patch) | |
tree | a2c27ee98c1e15fa4de96483c1e539298d594343 /apps | |
parent | 5a55bdfa227932de89d731a1f0444909e70d0e7b (diff) |
Change the default calldurationlimit from the special value 0 to -1, so we
can better detect an exceptional case. This follows on to the changes made
in revision 156386. Related to issue #13851.
(closes issue #13974)
Reported by: paradise
Patches:
20081208__bug13974.diff.txt uploaded by Corydon76 (license 14)
Tested by: file, blitzrage, ZX81
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@164082 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r-- | apps/app_dial.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/app_dial.c b/apps/app_dial.c index 1cc08564a..7e3f0ac63 100644 --- a/apps/app_dial.c +++ b/apps/app_dial.c @@ -876,7 +876,7 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags char numsubst[256]; char cidname[AST_MAX_EXTENSION] = ""; int privdb_val = 0; - unsigned int calldurationlimit = 0; + unsigned int calldurationlimit = -1; long timelimit = 0; long play_warning = 0; long warning_freq = 0; @@ -1017,7 +1017,7 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags start_sound = S_OR(var, NULL); /* XXX not much of a point in doing this! */ /* undo effect of S(x) in case they are both used */ - calldurationlimit = 0; + calldurationlimit = -1; /* more efficient to do it like S(x) does since no advanced opts */ if (!play_warning && !start_sound && !end_sound && timelimit) { calldurationlimit = timelimit / 1000; @@ -1751,7 +1751,7 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags if (!res) { if (calldurationlimit > 0) { peer->whentohangup = time(NULL) + calldurationlimit; - } else if (timelimit > 0) { + } else if (calldurationlimit != -1 && timelimit > 0) { /* Not enough granularity to make it less, but we can't use the special value 0 */ peer->whentohangup = time(NULL) + 1; } |