From f127386923bfef5b3fb01a0f929a86585752b387 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 28 Feb 2010 22:43:42 +0000 Subject: Fix loading LADSPA plugins from .om patches. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2509 a436a847-0d15-0410-975c-d299462d15a1 --- src/engine/events/Connect.cpp | 3 ++- src/engine/events/CreateNode.cpp | 21 ++++++++++++++++----- 2 files changed, 18 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/engine/events/Connect.cpp b/src/engine/events/Connect.cpp index 51378ca1..abc093a5 100644 --- a/src/engine/events/Connect.cpp +++ b/src/engine/events/Connect.cpp @@ -179,7 +179,8 @@ Connect::post_process() return; } - ss << boost::format("Unable to make connection %1% -> %2% (") % _src_port_path % _dst_port_path; + ss << boost::format("Unable to make connection %1% -> %2% (") + % _src_port_path.chop_scheme() % _dst_port_path.chop_scheme(); switch (_error) { case PARENT_PATCH_DIFFERENT: diff --git a/src/engine/events/CreateNode.cpp b/src/engine/events/CreateNode.cpp index 85d70305..dc3f4469 100644 --- a/src/engine/events/CreateNode.cpp +++ b/src/engine/events/CreateNode.cpp @@ -15,9 +15,9 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "raul/log.hpp" #include "raul/Maid.hpp" #include "raul/Path.hpp" -#include "raul/Path.hpp" #include "redlandmm/World.hpp" #include "shared/LV2URIMap.hpp" #include "CreateNode.hpp" @@ -62,12 +62,23 @@ CreateNode::CreateNode( string uri = _plugin_uri.str(); if (uri.substr(0, 3) == "om:") { size_t colon = 2; + uri = uri.substr(colon + 1); - if ((colon = uri.find(":")) == string::npos) + if ((colon = uri.find(":")) == string::npos) { + Raul::error << "Invalid plugin URI `" << _plugin_uri << "'" << endl; return; - _plugin_type = uri.substr(0, colon + 1); - _plugin_label = uri.substr(colon + 1); - uri = ""; + } + _plugin_type = uri.substr(0, colon); + + uri = uri.substr(colon + 1); + if ((colon = uri.find(":")) == string::npos) { + Raul::error << "Invalid plugin URI `" << _plugin_uri << "'" << endl; + return; + } + _plugin_lib = uri.substr(0, colon); + + uri = uri.substr(colon + 1); + _plugin_label = uri; } const LV2URIMap& uris = Shared::LV2URIMap::instance(); -- cgit v1.2.1