summaryrefslogtreecommitdiff
path: root/server/src/sessionserialiser.cc
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/sessionserialiser.cc')
-rw-r--r--server/src/sessionserialiser.cc12
1 files changed, 8 insertions, 4 deletions
diff --git a/server/src/sessionserialiser.cc b/server/src/sessionserialiser.cc
index f2e2f39..0929a30 100644
--- a/server/src/sessionserialiser.cc
+++ b/server/src/sessionserialiser.cc
@@ -39,6 +39,8 @@
#include "xml_encode_decode.h"
//#include "base64.h"
+#include "environment.h"
+
#include <stdio.h>
#include <string.h>
@@ -58,7 +60,8 @@ static std::string itostr(int i)
return sid;
}
-SessionSerialiser::SessionSerialiser(std::string path)
+SessionSerialiser::SessionSerialiser(Environment *e, std::string path)
+ : env(e)
{
this->path = path;
}
@@ -75,7 +78,8 @@ Session *SessionSerialiser::loadStr(const std::string &xml)
SessionParser parser;
parser.parse(xml.data(), xml.length());
- Session *session = new Session(XDEC(parser.sessionid),
+ Session *session = new Session(env,
+ XDEC(parser.sessionid),
XDEC(parser.patientid),
XDEC(parser.templ));
Journal *j = session->journal();
@@ -87,7 +91,7 @@ Session *SessionSerialiser::loadStr(const std::string &xml)
i++;
}
- session->database()->restore(XDEC(parser.database));
+ // session->database()->restore(XDEC(parser.database));
return session;
}
@@ -125,7 +129,7 @@ std::string SessionSerialiser::saveStr(Session *session)
std::string dbtype = "pgsql";
xml += " <database type=\""+dbtype+"\">"+
- XENC(session->database()->serialise())+
+ // XENC(session->database()->serialise())+
"</database>\n";
xml += "</session>\n";