From 78c7d9dfe4fe187b87d57cbb0aa7d11af256f8e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antti=20Sepp=C3=A4l=C3=A4?= Date: Sun, 7 Oct 2007 19:29:09 +0000 Subject: [PATCH] Maybe statistics are now calculated in actual bits? --- statistics.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/statistics.c b/statistics.c index 7eb5c55..f869ce9 100644 --- a/statistics.c +++ b/statistics.c @@ -3,7 +3,7 @@ * * See the README file for copyright information and how to reach the author. * - * $Id: statistics.c,v 1.7 2007/10/07 19:06:33 ajhseppa Exp $ + * $Id: statistics.c,v 1.8 2007/10/07 19:29:09 ajhseppa Exp $ */ #include @@ -40,7 +40,7 @@ cString cIptvSectionStatistics::GetStatistic() unit[0] = 'k'; } if (!IptvConfig.GetStatsInBytes()) { - divider /= sizeof(unsigned short); + divider /= sizeof(unsigned short) * 8; unit[1] = 'b'; } long tmpFilteredData = filteredData; @@ -81,7 +81,7 @@ cString cIptvDeviceStatistics::GetStatistic() unit[0] = 'k'; } if (!IptvConfig.GetStatsInBytes()) { - divider /= sizeof(unsigned short); + divider /= sizeof(unsigned short) * 8; unit[1] = 'b'; } dataBytes = 0; @@ -165,7 +165,7 @@ cString cIptvStreamerStatistics::GetStatistic() unit[0] = 'k'; } if (!IptvConfig.GetStatsInBytes()) { - divider /= sizeof(unsigned short); + divider /= sizeof(unsigned short) * 8; unit[1] = 'b'; } long tmpDataBytes = (long)(dataBytes / divider);