mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-18 15:49:56 +00:00
Small outgoing OSP cleanups
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3299 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user