1
0
mirror of https://github.com/rofafor/vdr-plugin-iptv.git synced 2023-10-10 13:37:03 +02:00

Maybe statistics are now calculated in actual bits?

This commit is contained in:
Antti Seppälä 2007-10-07 19:29:09 +00:00
parent 0b965f0c76
commit 78c7d9dfe4

View File

@ -3,7 +3,7 @@
* *
* See the README file for copyright information and how to reach the author. * 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 <limits.h> #include <limits.h>
@ -40,7 +40,7 @@ cString cIptvSectionStatistics::GetStatistic()
unit[0] = 'k'; unit[0] = 'k';
} }
if (!IptvConfig.GetStatsInBytes()) { if (!IptvConfig.GetStatsInBytes()) {
divider /= sizeof(unsigned short); divider /= sizeof(unsigned short) * 8;
unit[1] = 'b'; unit[1] = 'b';
} }
long tmpFilteredData = filteredData; long tmpFilteredData = filteredData;
@ -81,7 +81,7 @@ cString cIptvDeviceStatistics::GetStatistic()
unit[0] = 'k'; unit[0] = 'k';
} }
if (!IptvConfig.GetStatsInBytes()) { if (!IptvConfig.GetStatsInBytes()) {
divider /= sizeof(unsigned short); divider /= sizeof(unsigned short) * 8;
unit[1] = 'b'; unit[1] = 'b';
} }
dataBytes = 0; dataBytes = 0;
@ -165,7 +165,7 @@ cString cIptvStreamerStatistics::GetStatistic()
unit[0] = 'k'; unit[0] = 'k';
} }
if (!IptvConfig.GetStatsInBytes()) { if (!IptvConfig.GetStatsInBytes()) {
divider /= sizeof(unsigned short); divider /= sizeof(unsigned short) * 8;
unit[1] = 'b'; unit[1] = 'b';
} }
long tmpDataBytes = (long)(dataBytes / divider); long tmpDataBytes = (long)(dataBytes / divider);