[svn-commits] branch 1.2 - r7468 /branches/1.2/utils.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Tue Dec 13 10:06:27 CST 2005


Author: kpfleming
Date: Tue Dec 13 10:06:27 2005
New Revision: 7468

URL: http://svn.digium.com/view/asterisk?rev=7468&view=rev
Log:
correct broken math in tvfix() for timestamp values over one million

Modified:
    branches/1.2/utils.c

Modified: branches/1.2/utils.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/utils.c?rev=7468&r1=7467&r2=7468&view=diff
==============================================================================
--- branches/1.2/utils.c (original)
+++ branches/1.2/utils.c Tue Dec 13 10:06:27 2005
@@ -613,11 +613,11 @@
 	if (a.tv_usec >= ONE_MILLION) {
 		ast_log(LOG_WARNING, "warning too large timestamp %ld.%ld\n",
 			a.tv_sec, (long int) a.tv_usec);
-		a.tv_sec += a.tv_usec % ONE_MILLION;
+		a.tv_sec += a.tv_usec / ONE_MILLION;
 		a.tv_usec %= ONE_MILLION;
 	} else if (a.tv_usec < 0) {
 		ast_log(LOG_WARNING, "warning negative timestamp %ld.%ld\n",
-				a.tv_sec, (long int) a.tv_usec);
+			a.tv_sec, (long int) a.tv_usec);
 		a.tv_usec = 0;
 	}
 	return a;



More information about the svn-commits mailing list