Re-add the "-via" parameter support on UNIX platforms.



git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@5032 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/vncviewer/ServerDialog.cxx b/vncviewer/ServerDialog.cxx
index 25a010a..4cf3535 100644
--- a/vncviewer/ServerDialog.cxx
+++ b/vncviewer/ServerDialog.cxx
@@ -107,23 +107,22 @@
 }
 
 
-const char *ServerDialog::run(const char* servername)
+void ServerDialog::run(const char* servername, char *newservername)
 {
   ServerDialog dialog;
-  static char buffer[256];
 
   dialog.serverName->value(servername);
   
   dialog.show();
   while (dialog.shown()) Fl::wait();
 
-  if (dialog.serverName->value() == NULL)
-    return NULL;
+  if (dialog.serverName->value() == NULL) {
+    newservername[0] = '\0';
+    return;
+  }
 
-  strncpy(buffer, dialog.serverName->value(), sizeof(buffer));
-  buffer[sizeof(buffer)-1] = '\0';
-
-  return buffer;
+  strncpy(newservername, dialog.serverName->value(), VNCSERVERNAMELEN);
+  newservername[VNCSERVERNAMELEN - 1] = '\0';
 }
 
 void ServerDialog::handleOptions(Fl_Widget *widget, void *data)