diff options
author | David Robillard <d@drobilla.net> | 2012-05-22 03:30:42 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-05-22 03:30:42 +0000 |
commit | b1d4027b58465d9cc31d6cb1be05a7ff4f202711 (patch) | |
tree | b1b7e9d1379fc16c5f451fda7afff0d2bc071e18 /src/server/events/Get.cpp | |
parent | e3b0886bfbd12f65450d4b302371f07f511458c3 (diff) | |
download | ingen-b1d4027b58465d9cc31d6cb1be05a7ff4f202711.tar.gz ingen-b1d4027b58465d9cc31d6cb1be05a7ff4f202711.tar.bz2 ingen-b1d4027b58465d9cc31d6cb1be05a7ff4f202711.zip |
More work on test suite.
Clean up, simplify, and shrink event code.
Support disconnect_all via Atom protocol.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4432 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/server/events/Get.cpp')
-rw-r--r-- | src/server/events/Get.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/server/events/Get.cpp b/src/server/events/Get.cpp index 80fc34e8..6e0aafda 100644 --- a/src/server/events/Get.cpp +++ b/src/server/events/Get.cpp @@ -48,20 +48,21 @@ Get::Get(Engine& engine, { } -void +bool Get::pre_process() { _lock.acquire(); if (_uri == "ingen:plugins") { _plugins = _engine.node_factory()->plugins(); + return Event::pre_process_done(SUCCESS); } else if (Raul::Path::is_valid(_uri.str())) { _object = _engine.engine_store()->find_object(Raul::Path(_uri.str())); + return Event::pre_process_done(_object ? SUCCESS : NOT_FOUND); } else { _plugin = _engine.node_factory()->plugin(_uri); + return Event::pre_process_done(_plugin ? SUCCESS : NOT_FOUND); } - - Event::pre_process(); } static void @@ -84,12 +85,9 @@ send_node(Interface* client, const NodeImpl* node) PluginImpl* const plugin = node->plugin_impl(); if (plugin->type() == Plugin::Patch) { send_patch(client, (PatchImpl*)node); - } else if (plugin->uri().length() == 0) { - Raul::error((Raul::fmt("Node %1%'s plugin has no URI\n") - % node->path())); } else { client->put(node->path(), node->properties()); - for (size_t j=0; j < node->num_ports(); ++j) { + for (size_t j = 0; j < node->num_ports(); ++j) { send_port(client, node->port_impl(j)); } } |