[SCM] calf/master: Fix more crashiness in default-value logic.

js at users.alioth.debian.org js at users.alioth.debian.org
Tue May 7 15:40:25 UTC 2013


The following commit has been merged in the master branch:
commit f06a1fcb7940dacd5f2dfa1b244833a26ac0d470
Author: Krzysztof Foltman <wdev at foltman.com>
Date:   Fri Sep 24 23:13:48 2010 +0100

    Fix more crashiness in default-value logic.

diff --git a/src/dssigui.cpp b/src/dssigui.cpp
index c316bc1..5e59ae6 100644
--- a/src/dssigui.cpp
+++ b/src/dssigui.cpp
@@ -163,10 +163,15 @@ struct plugin_proxy: public plugin_ctl_iface, public line_graph_iface
     }
     char *configure(const char *key, const char *value) { 
         // do not store temporary vars in presets
-        if (strncmp(key, "OSC:", 4))
-            cfg_vars[key] = value;
         osc_inline_typed_strstream str;
-        str << key << value;
+        if (value)
+        {
+            if (strncmp(key, "OSC:", 4))
+                cfg_vars[key] = value;
+            str << key << value;
+        }
+        else
+            str << key;
         client->send("/configure", str);
         return NULL;
     }
diff --git a/src/lv2gui.cpp b/src/lv2gui.cpp
index efa95bc..e236bce 100644
--- a/src/lv2gui.cpp
+++ b/src/lv2gui.cpp
@@ -449,11 +449,17 @@ void ext_plugin_gui::receive_osc_message(std::string address, std::string args,
             feedback_sender->update();
     }
     else
-    if (address == "/bridge/configure" && args == "ss")
+    if (address == "/bridge/configure" && (args == "s" || args == "ss"))
     {
         string key, value;
-        buffer >> key >> value;
-        plugin_proxy_base::configure(key.c_str(), value.c_str());
+        buffer >> key;
+        if (args == "ss")
+        {
+            buffer >> value;
+            plugin_proxy_base::configure(key.c_str(), value.c_str());
+        }
+        else
+            plugin_proxy_base::configure(key.c_str(), NULL);
     }
     else
     if (address == "/bridge/send_status" && args == "i")

-- 
calf audio plugins packaging



More information about the pkg-multimedia-commits mailing list