diff --git a/oscar/SleepLib/machine.cpp b/oscar/SleepLib/machine.cpp index 6ccfa632..9d943345 100644 --- a/oscar/SleepLib/machine.cpp +++ b/oscar/SleepLib/machine.cpp @@ -286,7 +286,16 @@ bool Machine::AddSession(Session *s) return false; } if (sessionlist.contains(s->session())) { - qCritical() << "Machine::AddSession called with duplicate session" << s->session() << "for machine" << serial(); + qCritical() << "Machine::AddSession called with duplicate session" << s->session() + << "["+QDateTime::fromTime_t(s->session()).toString("MMM dd, yyyy hh:mm:ss")+"]" + << "for machine" << serial(); + return false; + } + + if (s->first() == 0) { + qWarning() << "Machine::AddSession called with session" << s->session() + << "["+QDateTime::fromTime_t(s->session()).toString("MMM dd, yyyy hh:mm:ss")+"]" + << "with first=0"; return false; } @@ -298,7 +307,6 @@ bool Machine::AddSession(Session *s) } } - updateChannels(s); if (s->session() > highest_sessionid) {