aboutsummaryrefslogtreecommitdiffstats
path: root/common/rfb/Configuration.cxx
diff options
context:
space:
mode:
authorPeter Åstrand (astrand) <astrand@cendio.se>2017-10-18 08:54:05 +0200
committerPeter Åstrand (astrand) <astrand@cendio.se>2017-11-08 10:40:14 +0100
commit0a0e582597be681488b91eb818c8a1963d13adbf (patch)
tree071bcb7d9ba88bbabdc1be623115299eaaa39bc1 /common/rfb/Configuration.cxx
parent90afb1c20cb5a73a86868b57692201b1a18e9c0e (diff)
downloadtigervnc-0a0e582597be681488b91eb818c8a1963d13adbf.tar.gz
tigervnc-0a0e582597be681488b91eb818c8a1963d13adbf.zip
x0vncserver does not support SetDesktopSize; remove -AcceptSetDesktopSize
Add a Configuration::removeParam to support such cases.
Diffstat (limited to 'common/rfb/Configuration.cxx')
-rw-r--r--common/rfb/Configuration.cxx18
1 files changed, 18 insertions, 0 deletions
diff --git a/common/rfb/Configuration.cxx b/common/rfb/Configuration.cxx
index a5c23028..418a0c93 100644
--- a/common/rfb/Configuration.cxx
+++ b/common/rfb/Configuration.cxx
@@ -1,5 +1,6 @@
/* Copyright (C) 2002-2005 RealVNC Ltd. All Rights Reserved.
* Copyright 2004-2005 Cendio AB.
+ * Copyright 2017 Peter Astrand <astrand@cendio.se> for Cendio AB
*
* This is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -166,6 +167,23 @@ void Configuration::list(int width, int nameWidth) {
}
+bool Configuration::remove(const char* param) {
+ VoidParameter *current = head;
+ VoidParameter **prevnext = &head;
+
+ while (current) {
+ if (strcasecmp(current->getName(), param) == 0) {
+ *prevnext = current->_next;
+ return true;
+ }
+ prevnext = &current->_next;
+ current = current->_next;
+ }
+
+ return false;
+}
+
+
// -=- VoidParameter
VoidParameter::VoidParameter(const char* name_, const char* desc_,