diff options
| author | deva <deva> | 2011-02-07 11:16:27 +0000 | 
|---|---|---|
| committer | deva <deva> | 2011-02-07 11:16:27 +0000 | 
| commit | ae91057323802dbfe5797cab6fd923149503b213 (patch) | |
| tree | a0ef887fda6cd3f6edf6e8c1ed9fbc212a24e158 /server/src/session.cc | |
| parent | 4ea34b413bd21c0e8ec4c3b93840bfe928d3c9c4 (diff) | |
Made isreadonly propagate to session file and back to live object.
Diffstat (limited to 'server/src/session.cc')
| -rw-r--r-- | server/src/session.cc | 7 | 
1 files changed, 4 insertions, 3 deletions
| 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;      }    } | 
