[asterisk-commits] mjordan: branch 1.8 r369366 - /branches/1.8/main/cdr.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Jun 25 14:24:56 CDT 2012
Author: mjordan
Date: Mon Jun 25 14:24:55 2012
New Revision: 369366
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=369366
Log:
Tweak CDR change in r369351
As Tilghman pointed out on review 1996, the check to see if a CDR end time has
been set is sufficient to know whether or not the duration value can be used.
The check-in done for r369351 forgot to include this change.
Modified:
branches/1.8/main/cdr.c
Modified: branches/1.8/main/cdr.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/main/cdr.c?view=diff&rev=369366&r1=369365&r2=369366
==============================================================================
--- branches/1.8/main/cdr.c (original)
+++ branches/1.8/main/cdr.c Mon Jun 25 14:24:55 2012
@@ -294,7 +294,7 @@
else if (!strcasecmp(name, "end"))
cdr_get_tv(cdr->end, raw ? NULL : fmt, workspace, workspacelen);
else if (!strcasecmp(name, "duration")) {
- snprintf(workspace, workspacelen, "%ld", cdr->duration || !ast_tvzero(cdr->end) ? cdr->duration : (long)ast_tvdiff_ms(ast_tvnow(), cdr->start) / 1000);
+ snprintf(workspace, workspacelen, "%ld", cdr->end.tv_sec != 0 ? cdr->duration : (long)ast_tvdiff_ms(ast_tvnow(), cdr->start) / 1000);
} else if (!strcasecmp(name, "billsec"))
snprintf(workspace, workspacelen, "%ld", cdr->billsec || cdr->answer.tv_sec == 0 ? cdr->billsec : (long)ast_tvdiff_ms(ast_tvnow(), cdr->answer) / 1000);
else if (!strcasecmp(name, "disposition")) {
More information about the asterisk-commits
mailing list