diff options
author | deva <deva> | 2011-01-28 08:50:42 +0000 |
---|---|---|
committer | deva <deva> | 2011-01-28 08:50:42 +0000 |
commit | 775d9c9c11f3906766c0dc7070eb7ef01606ef96 (patch) | |
tree | 7b957553d2778a4350d73f460997186e2484f5ca /server/src/connection.cc | |
parent | 7917d099f34acda6c4c90bca28710a7bd67800e9 (diff) |
New cross client system.
Diffstat (limited to 'server/src/connection.cc')
-rw-r--r-- | server/src/connection.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/server/src/connection.cc b/server/src/connection.cc index dd76f97..e4ec7f4 100644 --- a/server/src/connection.cc +++ b/server/src/connection.cc @@ -44,11 +44,15 @@ static std::string error_box(std::string message) static bool did_commit = false; #endif -Connection::Connection(Environment &e, std::string sid, bool c, bool d, bool nc) +Connection::Connection(Environment &e, std::string sid, + std::string pid, std::string t, + bool c, bool d, bool nc) : env(e), parser(&transaction) { DEBUG(connection, "[%p] CREATE\n", this); + patientid = pid; + templ = t; sessionid = sid; docommit = c; dodiscard = d; @@ -104,13 +108,13 @@ bool Connection::handle(const char *data, size_t size) Session *session = NULL; if(sessionid == "") { // Create new session - session = env.sessions.newSession(); + session = env.sessions.newSession(patientid, templ); } else { // Attach to old session session = env.sessions.session(sessionid); // Session didn't exist - create a new one anyway. - if(session == NULL) session = env.sessions.newSession(); + if(session == NULL) session = env.sessions.newSession(patientid, templ); } if(session == NULL) { |