[svn-commits] trunk r12995 - /trunk/cdr.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Tue Mar 14 17:29:26 MST 2006


Author: russell
Date: Tue Mar 14 18:29:25 2006
New Revision: 12995

URL: http://svn.digium.com/view/asterisk?rev=12995&view=rev
Log:
remove calculations that always evaluate to zero, thanks Luigi!

Modified:
    trunk/cdr.c

Modified: trunk/cdr.c
URL: http://svn.digium.com/view/asterisk/trunk/cdr.c?rev=12995&r1=12994&r2=12995&view=diff
==============================================================================
--- trunk/cdr.c (original)
+++ trunk/cdr.c Tue Mar 14 18:29:25 2006
@@ -657,9 +657,9 @@
 			ast_log(LOG_WARNING, "CDR on channel '%s' has not started\n", chan);
 		if (ast_tvzero(cdr->end))
 			cdr->end = ast_tvnow();
-		cdr->duration = cdr->end.tv_sec - cdr->start.tv_sec + (cdr->end.tv_usec - cdr->start.tv_usec) / 1000000;
+		cdr->duration = cdr->end.tv_sec - cdr->start.tv_sec;
 		if (!ast_tvzero(cdr->answer))
-			cdr->billsec = cdr->end.tv_sec - cdr->answer.tv_sec + (cdr->end.tv_usec - cdr->answer.tv_usec) / 1000000;
+			cdr->billsec = cdr->end.tv_sec - cdr->answer.tv_sec;
 		else
 			cdr->billsec = 0;
 		cdr = cdr->next;



More information about the svn-commits mailing list