diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2011-11-28 15:03:17 +0100 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2011-11-28 15:03:17 +0100 |
commit | 2a89f766b3c4917001de03a06bfbecb1ce25675f (patch) | |
tree | 03f2e68488a5dad0619651c771912e8759fddfdc /server/src/session.h | |
parent | dd1fb6e16ff777d3e098076d1015c6c565b51bb7 (diff) |
Use one-thread-per-connection and fix up Session locking.
Diffstat (limited to 'server/src/session.h')
-rw-r--r-- | server/src/session.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/server/src/session.h b/server/src/session.h index b5c31d7..4d1ed12 100644 --- a/server/src/session.h +++ b/server/src/session.h @@ -95,14 +95,14 @@ public: * Create a new session, with a unique id. Insert it into the session list, * and return its pointer. */ - Session *newSession(std::string patientid, std::string templ) + Session *newLockedSession(std::string patientid, std::string templ) throw(SessionAlreadyActive); /** * Lookup session in session list. Returns the session or NULL if no session * exists with that sessionid. */ - Session *session(std::string sessionid); + Session *lockedSession(std::string sessionid); /** * Remove session from the session list and return its pointer. It is up to @@ -136,13 +136,13 @@ private: Mutex mutex; }; -class SessionAutolock { +class SessionAutounlock { public: - SessionAutolock(Session &session); - ~SessionAutolock(); + SessionAutounlock(Session **session); + ~SessionAutounlock(); private: - Session &session; + Session **session; }; #endif/*__PRACRO_SESSION_H__*/ |