diff options
-rw-r--r-- | src/server/events/Delete.cpp | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/src/server/events/Delete.cpp b/src/server/events/Delete.cpp index 95e63d4d..6d2703b9 100644 --- a/src/server/events/Delete.cpp +++ b/src/server/events/Delete.cpp @@ -175,25 +175,21 @@ Delete::post_process() // XXX: Report error? Silently ignore? } else if (!_node && !_port) { respond(NOT_FOUND); - } else if (_patch_node_listnode) { - assert(_node); - _node->deactivate(); - respond(SUCCESS); - _engine.broadcaster()->bundle_begin(); - if (_disconnect_event) - _disconnect_event->post_process(); - _engine.broadcaster()->del(_path); - _engine.broadcaster()->bundle_end(); - _engine.maid()->push(_patch_node_listnode); - } else if (_patch_port_listnode) { - assert(_port); + } else if (_patch_node_listnode || _patch_port_listnode) { + if (_patch_node_listnode) { + _node->deactivate(); + _engine.maid()->push(_patch_node_listnode); + } else if (_patch_port_listnode) { + _engine.maid()->push(_patch_port_listnode); + } + respond(SUCCESS); _engine.broadcaster()->bundle_begin(); - if (_disconnect_event) + if (_disconnect_event) { _disconnect_event->post_process(); + } _engine.broadcaster()->del(_path); _engine.broadcaster()->bundle_end(); - _engine.maid()->push(_patch_port_listnode); } else { respond(FAILURE); } |