diff options
Diffstat (limited to 'src/server/events/Delete.cpp')
-rw-r--r-- | src/server/events/Delete.cpp | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/src/server/events/Delete.cpp b/src/server/events/Delete.cpp index 7ef4d2a5..9c68f4fe 100644 --- a/src/server/events/Delete.cpp +++ b/src/server/events/Delete.cpp @@ -63,8 +63,10 @@ Delete::~Delete() bool Delete::pre_process() { - if (_path.is_root() || _path == "path:/control_in" || _path == "path:/control_out") { - return Event::pre_process_done(NOT_DELETABLE); + if (_path.is_root() || + _path == "path:/control_in" || + _path == "path:/control_out") { + return Event::pre_process_done(NOT_DELETABLE, _path); } _lock.acquire(); @@ -157,13 +159,7 @@ Delete::post_process() { _lock.release(); _removed_bindings.reset(); - - if (!Raul::Path::is_path(_uri) - || _path.is_root() || _path == "path:/control_in" || _path == "path:/control_out") { - // XXX: Report error? Silently ignore? - } else if (!_node && !_port) { - respond(NOT_FOUND); - } else if (_patch_node_listnode || _patch_port_listnode) { + if (!respond() && (_patch_node_listnode || _patch_port_listnode)) { if (_patch_node_listnode) { _node->deactivate(); delete _patch_node_listnode; @@ -171,15 +167,12 @@ Delete::post_process() delete _patch_port_listnode; } - respond(SUCCESS); _engine.broadcaster()->bundle_begin(); if (_disconnect_event) { _disconnect_event->post_process(); } _engine.broadcaster()->del(_path); _engine.broadcaster()->bundle_end(); - } else { - respond(FAILURE); } if (_engine_port) { |