Signed-off-by: Martin Koegler <[email protected]>
---
common/rfb/Configuration.cxx | 6 ++++++
common/rfb/Configuration.h | 1 +
2 files changed, 7 insertions(+), 0 deletions(-)
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 @@ StringParameter::~StringParameter() {
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;
diff --git a/common/rfb/Configuration.h b/common/rfb/Configuration.h
index 3e21b18..c994f62 100644
--- a/common/rfb/Configuration.h
+++ b/common/rfb/Configuration.h
@@ -240,6 +240,7 @@ namespace rfb {
virtual bool setParam(const char* value);
virtual char* getDefaultStr() const;
virtual char* getValueStr() const;
+ virtual void setDefaultStr(const char* v);
// getData() returns a copy of the data - it must be delete[]d by the
// caller.
--
1.6.4.2
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Tigervnc-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tigervnc-devel