summaryrefslogtreecommitdiff
path: root/server/src/database.h
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/database.h')
-rw-r--r--server/src/database.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/server/src/database.h b/server/src/database.h
index a366f43..f3b42e2 100644
--- a/server/src/database.h
+++ b/server/src/database.h
@@ -62,6 +62,7 @@ public:
time_t now = time(NULL))
{
if(!dao) return;
+
mutex.lock();
DEBUG(db, "%s, %s, %s,...\n",
transaction.user.c_str(), transaction.cpr.c_str(),
@@ -79,7 +80,8 @@ public:
mutex.lock();
DEBUG(db, "%s, <%u fieldnames>, %ld\n",
patientid.c_str(), fieldnames.size(), oldest);
- Values values = dao->getLatestValues(sessionid, patientid, NULL, fieldnames, oldest);
+ Values values = dao->getLatestValues(sessionid, patientid,
+ NULL, fieldnames, oldest);
mutex.unlock();
return values;
}
@@ -172,6 +174,12 @@ public:
return dao->restore(data);
}
+ bool active()
+ {
+ if(!dao || sessionid == "") return false;
+ return dao->active(sessionId());
+ }
+
private:
PracroDAO *dao;
Mutex mutex;