diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-06-25 04:27:55 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-06-25 04:27:55 +0000 |
commit | 6c4cb5454fdb3be753f731b1ec136bf1907fea90 (patch) | |
tree | ab8d22af772f63075879470df697e1baccd043f5 /apps | |
parent | 06cd4ccbc289b04a971ce162de5faf27a45738d4 (diff) |
Small outgoing OSP cleanups
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@3299 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rwxr-xr-x | apps/app_osplookup.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/app_osplookup.c b/apps/app_osplookup.c index 7e6e0105b..55216d4eb 100755 --- a/apps/app_osplookup.c +++ b/apps/app_osplookup.c @@ -192,7 +192,10 @@ static int ospfinished_exec(struct ast_channel *chan, void *data) } if (chan->cdr) { start = chan->cdr->answer.tv_sec; - duration = time(NULL) - start; + if (start) + duration = time(NULL) - start; + else + duration = 0; } else ast_log(LOG_WARNING, "OSPFinish called on channel '%s' with no CDR!\n", chan->name); LOCAL_USER_ADD(u); |