Revision: 4796
          http://tigervnc.svn.sourceforge.net/tigervnc/?rev=4796&view=rev
Author:   bphinz
Date:     2011-11-11 19:12:33 +0000 (Fri, 11 Nov 2011)
Log Message:
-----------
java client should accept server port specified as either rfb port or display 
offset. Credit to Dan Garton for pointing this out.

Modified Paths:
--------------
    trunk/java/com/tigervnc/rfb/Hostname.java

Modified: trunk/java/com/tigervnc/rfb/Hostname.java
===================================================================
--- trunk/java/com/tigervnc/rfb/Hostname.java   2011-11-11 18:55:21 UTC (rev 
4795)
+++ trunk/java/com/tigervnc/rfb/Hostname.java   2011-11-11 19:12:33 UTC (rev 
4796)
@@ -36,6 +36,9 @@
     if (vncServerName.charAt(colonPos+1) == ':') {
       return Integer.parseInt(vncServerName.substring(colonPos+2));
     }
-    return Integer.parseInt(vncServerName.substring(colonPos+1)) + 5900;
+    int port = Integer.parseInt(vncServerName.substring(colonPos+1));
+    if (port < 100)
+      port += 5900;
+    return port;
   }
 }

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
Tigervnc-commits mailing list
Tigervnc-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tigervnc-commits

Reply via email to