Fixed host not always being set correctly, probably.

This commit is contained in:
Thulinma 2016-05-03 17:18:34 +02:00
parent 9e85f255ef
commit 911cb65740

View file

@ -1124,7 +1124,6 @@ namespace Mist {
} }
void Output::stats(){ void Output::stats(){
static bool setHost = true;
if (!isInitialized){ if (!isInitialized){
return; return;
} }
@ -1140,9 +1139,8 @@ namespace Mist {
lastStats = now; lastStats = now;
IPC::statExchange tmpEx(statsPage.getData()); IPC::statExchange tmpEx(statsPage.getData());
tmpEx.now(now); tmpEx.now(now);
if (setHost){ if (tmpEx.host() == std::string("\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000", 16)){
tmpEx.host(getConnectedBinHost()); tmpEx.host(getConnectedBinHost());
setHost = false;
} }
tmpEx.crc(crc); tmpEx.crc(crc);
tmpEx.streamName(streamName); tmpEx.streamName(streamName);