From 8b873373144f9eb8d72fefab32f2526539685e9d Mon Sep 17 00:00:00 2001 From: Thulinma Date: Thu, 26 May 2016 18:16:50 +0200 Subject: [PATCH] Added debug message for connections switching away from an existing active session. --- src/controller/controller_statistics.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/controller/controller_statistics.cpp b/src/controller/controller_statistics.cpp index 12ec9bb3..238e8962 100644 --- a/src/controller/controller_statistics.cpp +++ b/src/controller/controller_statistics.cpp @@ -684,7 +684,11 @@ void Controller::parseStatistics(char * data, size_t len, unsigned int id){ sessIndex idx(tmpEx); //if the connection was already indexed and it has changed, move it if (connToSession.count(id) && connToSession[id] != idx){ - INSANE_MSG("SWITCHING %s OVER TO %s", connToSession[id].toStr().c_str(), idx.toStr().c_str()); + if (sessions[connToSession[id]].getSessType() != SESS_UNSET){ + WARN_MSG("Switching connection from active session %s over to %s", connToSession[id].toStr().c_str(), idx.toStr().c_str()); + }else{ + INSANE_MSG("Switching connection from inactive session %s over to %s", connToSession[id].toStr().c_str(), idx.toStr().c_str()); + } sessions[connToSession[id]].switchOverTo(sessions[idx], id); if (!sessions[connToSession[id]].hasData()){ sessions.erase(connToSession[id]);