summaryrefslogtreecommitdiffstats
path: root/vncviewer
diff options
context:
space:
mode:
authorAdam Tkac <atkac@redhat.com>2013-02-19 14:30:32 +0000
committerAdam Tkac <atkac@redhat.com>2013-02-19 14:30:32 +0000
commit571089bceac205c3d5056fcb3f51c2d4b2d0592e (patch)
treeb1ca8c58db271231815f02538fa4d2d27bab6a6b /vncviewer
parent193ad14d35489bfcbd6bf093b19d8d259005cb05 (diff)
downloadtigervnc-571089bceac205c3d5056fcb3f51c2d4b2d0592e.tar.gz
tigervnc-571089bceac205c3d5056fcb3f51c2d4b2d0592e.zip
viewer: exit when user specifies both -via and -listen parameters
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@5048 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'vncviewer')
-rw-r--r--vncviewer/vncviewer.cxx10
1 files changed, 9 insertions, 1 deletions
diff --git a/vncviewer/vncviewer.cxx b/vncviewer/vncviewer.cxx
index 8e9622a5..6cf1d89f 100644
--- a/vncviewer/vncviewer.cxx
+++ b/vncviewer/vncviewer.cxx
@@ -444,7 +444,15 @@ int main(int argc, char** argv)
Socket *sock = NULL;
- if(listenMode) {
+ /* Specifying -via and -listen together is nonsense */
+ if (listenMode && strlen(via.getValueStr()) > 0) {
+ vlog.error("Parameters -listen and -via are incompatible");
+ fl_alert("Parameters -listen and -via are incompatible");
+ exit_vncviewer();
+ return 1;
+ }
+
+ if (listenMode) {
try {
int port = 5500;
if (isdigit(vncServerName[0]))