summaryrefslogtreecommitdiff
path: root/apps/app_osplookup.c
diff options
context:
space:
mode:
authorMark Spencer <markster@digium.com>2004-06-25 04:27:55 +0000
committerMark Spencer <markster@digium.com>2004-06-25 04:27:55 +0000
commit2f421a55da9b9e2f19bb1d02237f2d7d6846df5b (patch)
treeab8d22af772f63075879470df697e1baccd043f5 /apps/app_osplookup.c
parent42ad5693767a59d09c625cc35a2accdd0a954e0c (diff)
Small outgoing OSP cleanups
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3299 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_osplookup.c')
-rwxr-xr-xapps/app_osplookup.c5
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);