Merge branch 'development' into LTS_development

This commit is contained in:
Thulinma 2016-10-11 16:41:15 +02:00
commit 59ae4f5aca
9 changed files with 115 additions and 91 deletions

View file

@ -739,14 +739,18 @@ void Controller::parseStatistics(char * data, size_t len, unsigned int id){
sessions.erase(connToSession[id]);
}
}
if (!connToSession.count(id)){
INSANE_MSG("New connection: %lu as %s", id, idx.toStr().c_str());
}
//store the index for later comparison
connToSession[id] = idx;
//update the session with the latest data
sessions[idx].update(id, tmpEx);
//check validity of stats data
char counter = (*(data - 1));
char counter = (*(data - 1)) & 0x7F;
if (counter == 126 || counter == 127){
//the data is no longer valid - connection has gone away, store for later
INSANE_MSG("Ended connection: %lu as %s", id, idx.toStr().c_str());
sessions[idx].finish(id);
connToSession.erase(id);
}else{