File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -1206,6 +1206,9 @@ bool VNCConn::Init(const wxString& host,
12061206 // Support short-form (:0, :1)
12071207 if (cl->serverPort < 100 )
12081208 cl->serverPort += 5900 ;
1209+ // these might later get changed by the SSH tunneling setup so save them here
1210+ this ->serverHost = wxString (cl->serverHost , wxConvUTF8);
1211+ this ->serverPort = wxString () << cl->serverPort ;
12091212
12101213 if (repeaterId >= 0 ) {
12111214 cl->destHost = strdup (" ID" );
@@ -1822,7 +1825,7 @@ wxString VNCConn::getServerHost() const
18221825 if (cl->listenSpecified )
18231826 return wxEmptyString;
18241827 else
1825- return wxString (cl-> serverHost , wxConvUTF8) ;
1828+ return serverHost;
18261829 }
18271830 else
18281831 return wxEmptyString;
@@ -1833,7 +1836,7 @@ wxString VNCConn::getServerHost() const
18331836wxString VNCConn::getServerPort () const
18341837{
18351838 if (cl)
1836- return wxString () << cl-> serverPort ;
1839+ return serverPort;
18371840 else
18381841 return wxEmptyString;
18391842}
Original file line number Diff line number Diff line change @@ -217,6 +217,9 @@ class VNCConn: public wxEvtHandler, public wxThreadHelper
217217 rfbClient* cl;
218218 bool setupClient ();
219219
220+ wxString serverHost;
221+ wxString serverPort;
222+
220223 wxRect updated_rect;
221224
222225 wxCriticalSection mutex_framebuffer;
You can’t perform that action at this time.
0 commit comments