From 514555be0169e6491a14b92f6c08c889c52878eb Mon Sep 17 00:00:00 2001 From: Dennis Syrovatsky Date: Mon, 21 Nov 2005 14:40:56 +0000 Subject: [PATCH] Added methods for processing file transfer message FileListData. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@408 3789f03b-4d11-0410-bbf8-ca57d06f2519 --- rfb/CMsgHandler.h | 2 ++ rfb/CMsgReaderV3.cxx | 2 ++ vncviewer/FileTransfer.cxx | 2 +- vncviewer/cview.cxx | 4 ++++ vncviewer/cview.h | 2 ++ 5 files changed, 11 insertions(+), 1 deletion(-) diff --git a/rfb/CMsgHandler.h b/rfb/CMsgHandler.h index 7a69f145..68e5e861 100644 --- a/rfb/CMsgHandler.h +++ b/rfb/CMsgHandler.h @@ -56,6 +56,8 @@ namespace rfb { virtual void imageRect(const Rect& r, void* pixels); virtual void copyRect(const Rect& r, int srcX, int srcY); + virtual bool processFTMsg(int type) = 0; + ConnParams cp; }; } diff --git a/rfb/CMsgReaderV3.cxx b/rfb/CMsgReaderV3.cxx index 59519813..b8242a02 100644 --- a/rfb/CMsgReaderV3.cxx +++ b/rfb/CMsgReaderV3.cxx @@ -58,6 +58,8 @@ void CMsgReaderV3::readMsg() case msgTypeSetColourMapEntries: readSetColourMapEntries(); break; case msgTypeBell: readBell(); break; case msgTypeServerCutText: readServerCutText(); break; + case msgTypeFileListData: + handler->processFTMsg(type); break; default: fprintf(stderr, "unknown message type %d\n", type); throw Exception("unknown message type"); diff --git a/vncviewer/FileTransfer.cxx b/vncviewer/FileTransfer.cxx index 937dd26c..77ebe0a8 100644 --- a/vncviewer/FileTransfer.cxx +++ b/vncviewer/FileTransfer.cxx @@ -69,7 +69,7 @@ FileTransfer::show() bool FileTransfer::processFTMsg(int type) { - if (m_bInitialized) return false; + if (!m_bInitialized) return false; switch (type) { diff --git a/vncviewer/cview.cxx b/vncviewer/cview.cxx index 5f5d02e9..47018017 100644 --- a/vncviewer/cview.cxx +++ b/vncviewer/cview.cxx @@ -1705,3 +1705,7 @@ bool CView::getUserPasswd(char** user, char** password) { return true; } +bool CView::processFTMsg(int type) +{ + return m_fileTransfer.processFTMsg(type); +} \ No newline at end of file diff --git a/vncviewer/cview.h b/vncviewer/cview.h index 4bbf296b..d0b32688 100644 --- a/vncviewer/cview.h +++ b/vncviewer/cview.h @@ -176,6 +176,8 @@ namespace rfb { // Global user-config registry key static RegKey userConfigKey; + bool processFTMsg(int type); + protected: // Locally-rendered VNC cursor -- 2.39.5