diff options
Diffstat (limited to 'x11vnc/remote.c')
-rw-r--r-- | x11vnc/remote.c | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/x11vnc/remote.c b/x11vnc/remote.c index 22295f0..bb037a6 100644 --- a/x11vnc/remote.c +++ b/x11vnc/remote.c @@ -1363,7 +1363,11 @@ char *process_remote_cmd(char *cmd, int stringonly) { } if (!strcmp(p, "ultrafilexfer")) { if (query) { - snprintf(buf, bufn, "ans=%s:%d", p, screen->permitFileTransfer == TRUE); + if (screen) { + snprintf(buf, bufn, "ans=%s:%d", p, screen->permitFileTransfer == TRUE); + } else { + snprintf(buf, bufn, "ans=%s:%d", p, 0); + } goto qry; } if (! screen->permitFileTransfer) { @@ -1374,7 +1378,11 @@ char *process_remote_cmd(char *cmd, int stringonly) { } if (!strcmp(p, "noultrafilexfer")) { if (query) { - snprintf(buf, bufn, "ans=%s:%d", p, screen->permitFileTransfer == FALSE); + if (screen) { + snprintf(buf, bufn, "ans=%s:%d", p, screen->permitFileTransfer == FALSE); + } else { + snprintf(buf, bufn, "ans=%s:%d", p, 1); + } goto qry; } if (screen->permitFileTransfer) { @@ -1387,7 +1395,11 @@ char *process_remote_cmd(char *cmd, int stringonly) { int maj, min; COLON_CHECK("rfbversion:") if (query) { - snprintf(buf, bufn, "ans=%s:%d.%d", p, screen->protocolMajorVersion, screen->protocolMinorVersion); + if (screen) { + snprintf(buf, bufn, "ans=%s:%d.%d", p, screen->protocolMajorVersion, screen->protocolMinorVersion); + } else { + snprintf(buf, bufn, "ans=%s:%d.%d", p, 3, 8); + } goto qry; } p += strlen("rfbversion:"); @@ -5093,6 +5105,14 @@ char *process_remote_cmd(char *cmd, int stringonly) { NONUL(vnc_desktop_name)); goto qry; } + if (!strcmp(p, "autoport")) { + snprintf(buf, bufn, "aro=%s:%d", p, auto_port); + goto qry; + } + if (!strcmp(p, "loop") || !strcmp(p, "loopbg")) { + snprintf(buf, bufn, "aro=%s:%d", p, 0); + goto qry; + } if (!strcmp(p, "desktopname")) { snprintf(buf, bufn, "aro=%s:%s", p, NONUL(rfb_desktop_name)); |