summaryrefslogtreecommitdiff
path: root/res
diff options
context:
space:
mode:
authorKevin P. Fleming <kpfleming@digium.com>2005-09-14 21:24:50 +0000
committerKevin P. Fleming <kpfleming@digium.com>2005-09-14 21:24:50 +0000
commite84273f392deea2a0407fd2271686daff61b8a9a (patch)
tree36ce0661a67d6baccf9af9dc048daca97c984707 /res
parent1ec15b94586949b66d366254832a061587bff5e9 (diff)
use API call for setting call time limit (issue #5227)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6599 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res')
-rwxr-xr-xres/res_osp.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/res/res_osp.c b/res/res_osp.c
index 3053cd9cc..128befbcc 100755
--- a/res/res_osp.c
+++ b/res/res_osp.c
@@ -534,7 +534,6 @@ int ast_osp_lookup(struct ast_channel *chan, char *provider, char *extension, ch
OSPTCALLID *callid;
OSPE_DEST_PROT prot;
OSPE_DEST_OSP_ENABLED ospenabled;
- time_t now;
result->handle = -1;
result->numresults = 0;
@@ -597,8 +596,7 @@ int ast_osp_lookup(struct ast_channel *chan, char *provider, char *extension, ch
sizeof(callednum), callednum, sizeof(callingnum), callingnum, sizeof(destination), destination, 0, NULL, &tokenlen, token)) {
ast_log(LOG_DEBUG, "Got destination '%s' and called: '%s' calling: '%s' for '%s' (provider '%s')\n",
destination, callednum, callingnum, extension, provider);
- time (&now);
- chan->whentohangup = now + timelimit; // Only support OSP server with only one duration limit
+ ast_channel_setwhentohangup (chan, timelimit); /* Only support OSP server with only one duration limit */
do {
if (!OSPPTransactionIsDestOSPEnabled (result->handle, &ospenabled) && (ospenabled == OSPE_OSP_FALSE)) {
result->token[0] = 0;