diff options
| author | runge <runge> | 2009-02-26 02:28:28 +0000 |
|---|---|---|
| committer | runge <runge> | 2009-02-26 02:28:28 +0000 |
| commit | 453166ecdc6cf679df953f59bd34d873d39427ee (patch) | |
| tree | 75127b482a189828abd8779930c229f7d494a714 /x11vnc/remote.c | |
| parent | 81cda63cb49d66da1881c577e41364ea84b73ff9 (diff) | |
| download | libtdevnc-453166ec.tar.gz libtdevnc-453166ec.zip | |
x11vnc: fix some -QD cases for use in tkx11vnc.
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)); |
