summaryrefslogtreecommitdiffstats
path: root/src/engine/events
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/events')
-rw-r--r--src/engine/events/Delete.cpp13
-rw-r--r--src/engine/events/Delete.hpp10
2 files changed, 15 insertions, 8 deletions
diff --git a/src/engine/events/Delete.cpp b/src/engine/events/Delete.cpp
index 50b9174a..4a6e520b 100644
--- a/src/engine/events/Delete.cpp
+++ b/src/engine/events/Delete.cpp
@@ -36,9 +36,12 @@ namespace Ingen {
namespace Engine {
namespace Events {
-Delete::Delete(Engine& engine, SharedPtr<Request> request, FrameTime time, const Raul::Path& path)
+Delete::Delete(Engine& engine,
+ SharedPtr<Request> request,
+ FrameTime time,
+ const Raul::URI& uri)
: QueuedEvent(engine, request, time, true)
- , _path(path)
+ , _uri(uri)
, _store_iterator(engine.engine_store()->end())
, _garbage(NULL)
, _driver_port(NULL)
@@ -50,6 +53,9 @@ Delete::Delete(Engine& engine, SharedPtr<Request> request, FrameTime time, const
{
assert(request);
assert(request->source());
+
+ if (Raul::Path::is_path(uri))
+ _path = Raul::Path(uri.str());
}
Delete::~Delete()
@@ -166,7 +172,8 @@ Delete::post_process()
{
_removed_bindings.reset();
- if (_path.is_root() || _path == "path:/control_in" || _path == "path:/control_out") {
+ if (!Raul::Path::is_path(_uri)
+ || _path.is_root() || _path == "path:/control_in" || _path == "path:/control_out") {
// XXX: Just ignore?
//_request->respond_error(_path.chop_scheme() + " can not be deleted");
} else if (!_node && !_port) {
diff --git a/src/engine/events/Delete.hpp b/src/engine/events/Delete.hpp
index 234d8977..f00ad847 100644
--- a/src/engine/events/Delete.hpp
+++ b/src/engine/events/Delete.hpp
@@ -58,11 +58,10 @@ class DisconnectAll;
class Delete : public QueuedEvent
{
public:
- Delete(
- Engine& engine,
- SharedPtr<Request> request,
- FrameTime timestamp,
- const Raul::Path& path);
+ Delete(Engine& engine,
+ SharedPtr<Request> request,
+ FrameTime timestamp,
+ const Raul::URI& uri);
~Delete();
@@ -71,6 +70,7 @@ public:
void post_process();
private:
+ Raul::URI _uri;
Raul::Path _path;
EngineStore::iterator _store_iterator;
SharedPtr<NodeImpl> _node; ///< Non-NULL iff a node