diff --git a/daemon/HTTPServer.cpp b/daemon/HTTPServer.cpp
index 7217879f..a08a78b2 100644
--- a/daemon/HTTPServer.cpp
+++ b/daemon/HTTPServer.cpp
@@ -678,11 +678,11 @@ namespace http {
{
s << "
" << tr("Network Status") << " | ";
if (i2p::context.SupportsV4 ()) {
- s << "" >> tr("IPv4") << "";
+ s << "" << tr("IPv4") << " ";
ShowNetworkStatus (s, i2p::context.GetStatus ());
}
if (i2p::context.SupportsV6 ()) {
- s << "" >> tr("IPv6") << "";
+ s << "" << tr("IPv6") << " ";
ShowNetworkStatus (s, i2p::context.GetStatusV6 ());
}
s << " |
\r\n";
@@ -703,7 +703,8 @@ namespace http {
s << "" << tr("Bandwidth") << " | ";
s << std::fixed << std::setprecision(0);
if (i2p::transport::transports.GetInBandwidth () > 1024*1024*1024 ||
- i2p::transport::transports.GetInBandwidth () < 1024)
+ i2p::transport::transports.GetInBandwidth () < 1024 &&
+ i2p::transport::transports.GetInBandwidth () > 0)
s << std::fixed << std::setprecision(2);
else if (i2p::transport::transports.GetInBandwidth () > 1024*1024)
s << std::fixed << std::setprecision(1);
@@ -711,7 +712,8 @@ namespace http {
s << " / ";
s << std::fixed << std::setprecision(0);
if (i2p::transport::transports.GetOutBandwidth () > 1024*1024*1024 ||
- i2p::transport::transports.GetOutBandwidth () < 1024)
+ i2p::transport::transports.GetOutBandwidth () < 1024 &&
+ i2p::transport::transports.GetOutBandwidth () > 0)
s << std::fixed << std::setprecision(2);
else if (i2p::transport::transports.GetOutBandwidth () > 1024*1024)
s << std::fixed << std::setprecision(1);
@@ -720,8 +722,10 @@ namespace http {
if ((i2p::context.AcceptsTunnels() || i2p::tunnel::tunnels.CountTransitTunnels()) &&
(i2p::transport::transports.GetTotalReceivedBytes () > 0)) {
+ s << std::fixed << std::setprecision(0);
if (i2p::transport::transports.GetTransitBandwidth () > 1024*1024*1024 ||
- i2p::transport::transports.GetTransitBandwidth () < 1024)
+ i2p::transport::transports.GetTransitBandwidth () < 1024 &&
+ i2p::transport::transports.GetTransitBandwidth () > 0)
s << std::fixed << std::setprecision(2);
else if (i2p::transport::transports.GetTransitBandwidth () > 1024*1024)
s << std::fixed << std::setprecision(1);
@@ -752,13 +756,12 @@ namespace http {
(i2p::transport::transports.GetTotalReceivedBytes () > 0)) {
s << " / ";
- s << std::fixed << std::setprecision(0);
+ s << std::fixed << std::setprecision(0); // should set 0 bytes to no decimal places, but doesn't!
if (i2p::transport::transports.GetTotalTransitTransmittedBytes () > 1024*1024*1024)
s << std::fixed << std::setprecision(2);
else if (i2p::transport::transports.GetTotalTransitTransmittedBytes () > 1024*1024)
s << std::fixed << std::setprecision(1);
ShowTraffic (s, i2p::transport::transports.GetTotalTransitTransmittedBytes ());
- s << std::fixed << std::setprecision(0);
s << "";
}
s << " |
\r\n";