From 05182c2214c5983c8ce7376c42805ad9802c75e5 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Thu, 9 Aug 2012 12:04:43 +0200 Subject: Added session files to admin session list. --- server/src/admin_connection.cc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'server/src/admin_connection.cc') diff --git a/server/src/admin_connection.cc b/server/src/admin_connection.cc index 1522627..76c88ea 100644 --- a/server/src/admin_connection.cc +++ b/server/src/admin_connection.cc @@ -35,6 +35,7 @@ #include "debug.h" #include "configuration.h" +#include "sessionserialiser.h" static std::string admin_sessionunlock(Environment &env, std::string id) { @@ -67,6 +68,20 @@ static std::string admin_listactivesessions(Environment &env) i++; } + SessionSerialiser ser(&env, Conf::session_path); + std::map files = ser.sessionFiles(); + + std::map::iterator j = files.begin(); + while(j != files.end()) { + std::string file = j->first; + SessionHeaderParser::Header header = j->second; + + str += "Session " + header.id + ": " + header.templ + " on " + + header.patientid + " [session file: " + file + "]\n"; + + j++; + } + return str; } -- cgit v1.2.3