diff options
author | jpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-01-18 22:31:25 +0000 |
---|---|---|
committer | jpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-01-18 22:31:25 +0000 |
commit | 93d780894810f0460892af0529d9c6f8fe517338 (patch) | |
tree | 07b772f4a93f6e959ccf10510fee364dd143f4f6 /pbx | |
parent | ce857ad4e1f48d742ab491d0170d97d23ec3814f (diff) |
Extend max call limit duration from 24.8 days to 292+ million years.
If the limit was set past MAX_INT upon answering, the call was immediately
hung up due to overflow from the return of ast_tvdiff_ms (in ast_check_hangup).
The time calculation functions ast_tvdiff_sec and ast_tvdiff_ms have been
changed to return an int64_t to prevent overflow. Also the reporter suggested
adding a message indicating the reason for the call hanging up. Given that the
new limit is so much higher, the message (which would only really be useful in
the overflow scenario) has been made a debug message only.
(closes issue #16006)
Reported by: viraptor
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@241143 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx')
-rw-r--r-- | pbx/pbx_dundi.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pbx/pbx_dundi.c b/pbx/pbx_dundi.c index 68050a8ed..2b57002f3 100644 --- a/pbx/pbx_dundi.c +++ b/pbx/pbx_dundi.c @@ -2393,7 +2393,7 @@ static char *dundi_do_lookup(struct ast_cli_entry *e, int cmd, struct ast_cli_ar ast_cli(a->fd, "%3d. %5d %s/%s (%s)\n", x + 1, dr[x].weight, dr[x].tech, dr[x].dest, dundi_flags2str(fs, sizeof(fs), dr[x].flags)); ast_cli(a->fd, " from %s, expires in %d s\n", dr[x].eid_str, dr[x].expiration); } - ast_cli(a->fd, "DUNDi lookup completed in %d ms\n", ast_tvdiff_ms(ast_tvnow(), start)); + ast_cli(a->fd, "DUNDi lookup completed in %" PRIi64 " ms\n", ast_tvdiff_ms(ast_tvnow(), start)); return CLI_SUCCESS; } @@ -2430,7 +2430,7 @@ static char *dundi_do_precache(struct ast_cli_entry *e, int cmd, struct ast_cli_ ast_cli(a->fd, "DUNDi precache returned error.\n"); else if (!res) ast_cli(a->fd, "DUNDi precache returned no error.\n"); - ast_cli(a->fd, "DUNDi lookup completed in %d ms\n", ast_tvdiff_ms(ast_tvnow(), start)); + ast_cli(a->fd, "DUNDi lookup completed in %" PRIi64 " ms\n", ast_tvdiff_ms(ast_tvnow(), start)); return CLI_SUCCESS; } |