summaryrefslogtreecommitdiff
path: root/client/viewer.cc
diff options
context:
space:
mode:
authordeva <deva>2010-06-01 12:58:32 +0000
committerdeva <deva>2010-06-01 12:58:32 +0000
commit74a28aa7125be6a603128ad600c98c4882f3b5c2 (patch)
tree1a9e4ab74f29d5ff10f2701e4e112f4525c0dcec /client/viewer.cc
parent9b9c1e2dd3e5807ff7714b378b03b9ba31f42df7 (diff)
From new_protocol branch.
Diffstat (limited to 'client/viewer.cc')
-rw-r--r--client/viewer.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/client/viewer.cc b/client/viewer.cc
index 09b6e47..c4bd3f5 100644
--- a/client/viewer.cc
+++ b/client/viewer.cc
@@ -81,7 +81,12 @@ Viewer::Viewer(QString cpr, QString templs, QString host, quint16 port,
this->templs = templs.split(QRegExp("\\W+"), QString::SkipEmptyParts);
connect(&updatetimer, SIGNAL(timeout()), this, SLOT(update()));
- netcom = new NetCom(host, port, user, cpr);
+ netcom = new NetCom(host, port);
+ netcom->user = user;
+ netcom->patientid = cpr;
+ netcom->sessionid = "";
+ netcom->initConnection();
+
host = host; port = port; user = user;
this->cpr = cpr;
this->journalpath = journalpath;
@@ -109,6 +114,8 @@ Viewer::Viewer(QString cpr, QString templs, QString host, quint16 port,
Viewer::~Viewer()
{
+ updatetimer.stop();
+ netcom->discard(); // Make sure sessionid is removed.
delete netcom;
delete journal;
}