summaryrefslogtreecommitdiffstats
path: root/x11vnc/remote.c
diff options
context:
space:
mode:
authorrunge <runge>2007-02-16 19:58:34 +0000
committerrunge <runge>2007-02-16 19:58:34 +0000
commit057fdbb3eb8671886f0f6777e8af3098eaed55ae (patch)
treefacff48daf5e60e3856c69e5020164ed0b8ff82e /x11vnc/remote.c
parentf1e8149ae75eb7c0b08d4fde27bd164728cfdf68 (diff)
downloadlibtdevnc-057fdbb3eb8671886f0f6777e8af3098eaed55ae.tar.gz
libtdevnc-057fdbb3eb8671886f0f6777e8af3098eaed55ae.zip
x11vnc: add Files mode to user controlled input. more ultra/tight filexfer tweaks. rfbversion remote control. noncache/nc unixpw user opt.
Diffstat (limited to 'x11vnc/remote.c')
-rw-r--r--x11vnc/remote.c42
1 files changed, 40 insertions, 2 deletions
diff --git a/x11vnc/remote.c b/x11vnc/remote.c
index 19201cb..85d92d1 100644
--- a/x11vnc/remote.c
+++ b/x11vnc/remote.c
@@ -1272,7 +1272,7 @@ char *process_remote_cmd(char *cmd, int stringonly) {
}
#ifdef LIBVNCSERVER_WITH_TIGHTVNC_FILETRANSFER
if (! tightfilexfer) {
- rfbLog("remote_cmd: enabling -tightfilexfer for new clients.\n");
+ rfbLog("remote_cmd: enabling -tightfilexfer for *NEW* clients.\n");
tightfilexfer = 1;
rfbRegisterTightVNCFileTransferExtension();
}
@@ -1287,7 +1287,7 @@ char *process_remote_cmd(char *cmd, int stringonly) {
}
#ifdef LIBVNCSERVER_WITH_TIGHTVNC_FILETRANSFER
if (tightfilexfer) {
- rfbLog("remote_cmd: disabling -tightfilexfer for new clients.\n");
+ rfbLog("remote_cmd: disabling -tightfilexfer for *NEW* clients.\n");
tightfilexfer = 0;
rfbUnregisterTightVNCFileTransferExtension();
}
@@ -1295,6 +1295,44 @@ char *process_remote_cmd(char *cmd, int stringonly) {
rfbLog("remote_cmd: -tightfilexfer not supported in this binary.\n");
#endif
+ } else if (!strcmp(p, "ultrafilexfer")) {
+ if (query) {
+ snprintf(buf, bufn, "ans=%s:%d", p, screen->permitFileTransfer == TRUE);
+ goto qry;
+ }
+ if (! screen->permitFileTransfer) {
+ rfbLog("remote_cmd: enabling -ultrafilexfer for clients.\n");
+ screen->permitFileTransfer = TRUE;
+ }
+
+ } else if (!strcmp(p, "noultrafilexfer")) {
+ if (query) {
+ snprintf(buf, bufn, "ans=%s:%d", p, screen->permitFileTransfer == FALSE);
+ goto qry;
+ }
+ if (screen->permitFileTransfer) {
+ rfbLog("remote_cmd: disabling -ultrafilexfer for clients.\n");
+ screen->permitFileTransfer = FALSE;
+ }
+
+ } else if (strstr(p, "rfbversion") == p) {
+ int maj, min;
+ COLON_CHECK("rfbversion:")
+ if (query) {
+ snprintf(buf, bufn, "ans=%s:%d.%d", p, screen->protocolMajorVersion, screen->protocolMinorVersion);
+ goto qry;
+ }
+ p += strlen("rfbversion:");
+
+ if (sscanf(p, "%d.%d", &maj, &min) == 2) {
+ screen->protocolMajorVersion = maj;
+ screen->protocolMinorVersion = min;
+ rfbLog("remote_cmd: set rfbversion to: %d.%d\n", maj, min);
+ } else {
+ rfbLog("remote_cmd: invalid rfbversion: %s\n", p);
+ }
+
+
} else if (!strcmp(p, "deny") || !strcmp(p, "lock")) {
if (query) {
snprintf(buf, bufn, "ans=%s:%d", p, deny_all);