[Development] Allow changing the default value of string parameters. (Martin Koegler)


git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4194 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/common/rfb/Configuration.cxx b/common/rfb/Configuration.cxx
index 6811a79..e9eee1a 100644
--- a/common/rfb/Configuration.cxx
+++ b/common/rfb/Configuration.cxx
@@ -418,6 +418,12 @@
   strFree(value);
 }
 
+void StringParameter::setDefaultStr(const char* v) {
+  def_value = v;
+  strFree(value);
+  value = strDup(v);
+}
+
 bool StringParameter::setParam(const char* v) {
   LOCK_CONFIG;
   if (immutable) return true;