summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgeorge82 <george82@3789f03b-4d11-0410-bbf8-ca57d06f2519>2005-02-03 14:10:07 +0000
committergeorge82 <george82@3789f03b-4d11-0410-bbf8-ca57d06f2519>2005-02-03 14:10:07 +0000
commit2b9d03dad57012fd5ee1da89e9cda9bbbff34ae9 (patch)
treeb5adcee2fd3d69545e9224ddaf9f8f49f87ad896
parent17e92cb9edc9a67e892bba1a5921429179ebd986 (diff)
downloadtigervnc-2b9d03dad57012fd5ee1da89e9cda9bbbff34ae9.tar.gz
tigervnc-2b9d03dad57012fd5ee1da89e9cda9bbbff34ae9.zip
Improved rfbSessionReader class implementation.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@137 3789f03b-4d11-0410-bbf8-ca57d06f2519
-rw-r--r--rfbplayer/rfbSessionReader.h8
-rw-r--r--rfbplayer/rfbplayer.cxx2
2 files changed, 3 insertions, 7 deletions
diff --git a/rfbplayer/rfbSessionReader.h b/rfbplayer/rfbSessionReader.h
index 06941b1e..f42a9eee 100644
--- a/rfbplayer/rfbSessionReader.h
+++ b/rfbplayer/rfbSessionReader.h
@@ -32,16 +32,14 @@ public:
};
~rfbSessionReader() {
- fStop = true;
- delete join();
}
- void stop() {
+ virtual Thread* join() {
fStop = true;
+ return Thread::join();
}
- void rfbSessionReader::run() {
- fStop = false;
+ virtual void rfbSessionReader::run() {
// Process the rfb messages
while (!fStop) {
try {
diff --git a/rfbplayer/rfbplayer.cxx b/rfbplayer/rfbplayer.cxx
index 169d7161..af6811b1 100644
--- a/rfbplayer/rfbplayer.cxx
+++ b/rfbplayer/rfbplayer.cxx
@@ -235,7 +235,6 @@ RfbPlayer::RfbPlayer(char *_fileName, long _initTime = 0, double _playbackSpeed
RfbPlayer::~RfbPlayer() {
vlog.debug("~RfbPlayer");
if (rfbReader) {
- rfbReader->stop();
delete rfbReader->join();
rfbReader = 0;
}
@@ -820,7 +819,6 @@ void RfbPlayer::openSessionFile(char *_fileName) {
// Close the previous reading thread
if (rfbReader) {
- rfbReader->stop();
delete rfbReader->join();
}
blankBuffer();