From 2a89f766b3c4917001de03a06bfbecb1ce25675f Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Mon, 28 Nov 2011 15:03:17 +0100 Subject: Use one-thread-per-connection and fix up Session locking. --- server/src/session.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'server/src/session.h') 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__*/ -- cgit v1.2.3