summaryrefslogtreecommitdiffstats
path: root/src/server
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-05-14 04:37:49 +0000
committerDavid Robillard <d@drobilla.net>2012-05-14 04:37:49 +0000
commit3ffc448198c364224d04db006abd843716adf32f (patch)
tree4467a21f2e75fac5bbafde071292ce97dfaa5de7 /src/server
parentf180683d453814dcd4a00eb5f0946fd7fc5677c4 (diff)
downloadingen-3ffc448198c364224d04db006abd843716adf32f.tar.gz
ingen-3ffc448198c364224d04db006abd843716adf32f.tar.bz2
ingen-3ffc448198c364224d04db006abd843716adf32f.zip
Factor out common code.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4406 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/server')
-rw-r--r--src/server/events/Delete.cpp24
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);
}