diff --git a/src/controller/controller_statistics.cpp b/src/controller/controller_statistics.cpp index 05d144c5..7d59b41d 100644 --- a/src/controller/controller_statistics.cpp +++ b/src/controller/controller_statistics.cpp @@ -48,7 +48,16 @@ void Controller::SharedMemStats(void * config){ /// It updates the internally saved statistics data. void Controller::statStorage::update(IPC::statExchange & data) { if (!streamName.size()){ - host = data.host(); + std::string tHost = data.host(); + if (tHost.substr(0, 12) == std::string("\000\000\000\000\000\000\000\000\000\000\377\377", 12)){ + char tmpstr[16]; + snprintf(tmpstr, 16, "%hhu.%hhu.%hhu.%hhu", tHost[12], tHost[13], tHost[14], tHost[15]); + host = tmpstr; + }else{ + char tmpstr[40]; + snprintf(tmpstr, 40, "%0.2x%0.2x:%0.2x%0.2x:%0.2x%0.2x:%0.2x%0.2x:%0.2x%0.2x:%0.2x%0.2x:%0.2x%0.2x:%0.2x%0.2x", tHost[0], tHost[1], tHost[2], tHost[3], tHost[4], tHost[5], tHost[6], tHost[7], tHost[8], tHost[9], tHost[10], tHost[11], tHost[12], tHost[13], tHost[14], tHost[15]); + host = tmpstr; + } streamName = data.streamName(); } if (!connector.size()){ diff --git a/src/input/input.cpp b/src/input/input.cpp index 72d5e152..d3746eec 100644 --- a/src/input/input.cpp +++ b/src/input/input.cpp @@ -264,7 +264,7 @@ namespace Mist { curData[tid].dataSize += lastPack.getDataLen(); curData[tid].partNum ++; bookKeeping[tid].curPart ++; - DEBUG_MSG(DLVL_DONTEVEN, "Track %d:%d on page %d, being part %d of key %d", lastPack.getTrackId(), lastPack.getTime(), bookKeeping[tid].first, curData[tid].partNum, curData[tid].keyNum); + DEBUG_MSG(DLVL_DONTEVEN, "Track %ld:%llu on page %d, being part %d of key %d", lastPack.getTrackId(), lastPack.getTime(), bookKeeping[tid].first, curData[tid].partNum, curData[tid].keyNum); getNext(false); } for (std::map::iterator it = myMeta.tracks.begin(); it != myMeta.tracks.end(); it++) { diff --git a/src/output/output.cpp b/src/output/output.cpp index af2af942..5e2e0fa3 100644 --- a/src/output/output.cpp +++ b/src/output/output.cpp @@ -638,6 +638,7 @@ namespace Mist { } void Output::stats(){ + static bool setHost = true; if (!isInitialized){ return; } @@ -647,7 +648,10 @@ namespace Mist { lastStats = now; IPC::statExchange tmpEx(statsPage.getData()); tmpEx.now(now); - tmpEx.host(myConn.getHost()); + if (setHost){ + tmpEx.host(myConn.getBinHost()); + setHost = false; + } tmpEx.streamName(streamName); tmpEx.connector(capa["name"].asString()); tmpEx.up(myConn.dataUp());