[Freeswitch-svn] [commit] r12076 - freeswitch/trunk/scripts/contrib/dschreiber/mod_nibblebill

FreeSWITCH SVN dschreiber at freeswitch.org
Mon Feb 16 16:40:32 PST 2009


Author: dschreiber
Date: Mon Feb 16 18:40:31 2009
New Revision: 12076

Log:
Fix for mod_nibblebill for fast systems that have really accurate timestamps that are always 0



Modified:
   freeswitch/trunk/scripts/contrib/dschreiber/mod_nibblebill/mod_nibblebill.c

Modified: freeswitch/trunk/scripts/contrib/dschreiber/mod_nibblebill/mod_nibblebill.c
==============================================================================
--- freeswitch/trunk/scripts/contrib/dschreiber/mod_nibblebill/mod_nibblebill.c	(original)
+++ freeswitch/trunk/scripts/contrib/dschreiber/mod_nibblebill/mod_nibblebill.c	Mon Feb 16 18:40:31 2009
@@ -392,7 +392,7 @@
 	switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%d seconds passed since last bill time of %s\n", (int) ((ts - nibble_data->lastts) / 1000000), date);
 
 
-	if ((ts - nibble_data->lastts) > 0) {
+	if ((ts - nibble_data->lastts) >= 0) {
 		/* Convert billrate into microseconds and multiply by # of microseconds that have passed since last *successful* bill */
 		billamount = (atof(billrate) / 1000000 / 60) * ((ts - nibble_data->lastts)) - nibble_data->bill_adjustments;
 



More information about the Freeswitch-svn mailing list