From ae91057323802dbfe5797cab6fd923149503b213 Mon Sep 17 00:00:00 2001 From: deva Date: Mon, 7 Feb 2011 11:16:27 +0000 Subject: Made isreadonly propagate to session file and back to live object. --- server/src/session.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'server/src/session.cc') diff --git a/server/src/session.cc b/server/src/session.cc index 7290c31..530efac 100644 --- a/server/src/session.cc +++ b/server/src/session.cc @@ -182,9 +182,9 @@ Session *Sessions::newSession(std::string patientid, std::string templ) while(i != sessions.end()) { if(i->second->patientid == patientid && i->second->templ == templ) { - Session *s = i->second; - if(s->active()) throw SessionAlreadyActive(s->id()); - return s; + Session *session = i->second; + if(session->active()) throw SessionAlreadyActive(session->id()); + return session; } i++; @@ -195,6 +195,7 @@ Session *Sessions::newSession(std::string patientid, std::string templ) Session *session = ser.findFromTupple(patientid, templ); if(session) { sessions[session->id()] = session; + if(session->active()) throw SessionAlreadyActive(session->id()); return session; } } -- cgit v1.2.3