Clean up internal clipboard handling
We now filter incoming data, which means we can start assuming the
clipboard data is always null terminated. This allows us to clean
up a lot of the internal handling.
diff --git a/common/rfb/VNCSConnectionST.cxx b/common/rfb/VNCSConnectionST.cxx
index fe00dab..002ae92 100644
--- a/common/rfb/VNCSConnectionST.cxx
+++ b/common/rfb/VNCSConnectionST.cxx
@@ -282,13 +282,13 @@
}
}
-void VNCSConnectionST::serverCutTextOrClose(const char *str, int len)
+void VNCSConnectionST::serverCutTextOrClose(const char *str)
{
try {
if (!accessCheck(AccessCutText)) return;
if (!rfb::Server::sendCutText) return;
if (state() == RFBSTATE_NORMAL)
- writer()->writeServerCutText(str, len);
+ writer()->writeServerCutText(str);
} catch(rdr::Exception& e) {
close(e.str());
}
@@ -596,11 +596,11 @@
server->keyEvent(keysym, keycode, down);
}
-void VNCSConnectionST::clientCutText(const char* str, int len)
+void VNCSConnectionST::clientCutText(const char* str)
{
if (!accessCheck(AccessCutText)) return;
if (!rfb::Server::acceptCutText) return;
- server->clientCutText(str, len);
+ server->clientCutText(str);
}
void VNCSConnectionST::framebufferUpdateRequest(const Rect& r,bool incremental)