summaryrefslogtreecommitdiffstats
path: root/src/server/events/CreatePort.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-07-26 15:27:03 +0000
committerDavid Robillard <d@drobilla.net>2012-07-26 15:27:03 +0000
commit3c5931bb13b5f88edcebb375fa6964dde8b85563 (patch)
tree9801897576b7fb9d8a9f700847c670f216fc93b7 /src/server/events/CreatePort.cpp
parentb83ed4f83cf4c9b5054dcf55bea710313c369633 (diff)
downloadingen-3c5931bb13b5f88edcebb375fa6964dde8b85563.tar.gz
ingen-3c5931bb13b5f88edcebb375fa6964dde8b85563.tar.bz2
ingen-3c5931bb13b5f88edcebb375fa6964dde8b85563.zip
Report subject with errors to client for more meaningful error messages.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4556 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/server/events/CreatePort.cpp')
-rw-r--r--src/server/events/CreatePort.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/server/events/CreatePort.cpp b/src/server/events/CreatePort.cpp
index 9ddb8894..b89a90cc 100644
--- a/src/server/events/CreatePort.cpp
+++ b/src/server/events/CreatePort.cpp
@@ -85,15 +85,15 @@ bool
CreatePort::pre_process()
{
if (_port_type == PortType::UNKNOWN) {
- return Event::pre_process_done(UNKNOWN_TYPE);
+ return Event::pre_process_done(UNKNOWN_TYPE, _path);
}
if (_engine.engine_store()->find_object(_path)) {
- return Event::pre_process_done(_status);
+ return Event::pre_process_done(_status, _path);
}
if (!(_patch = _engine.engine_store()->find_patch(_path.parent()))) {
- return Event::pre_process_done(PARENT_NOT_FOUND);
+ return Event::pre_process_done(PARENT_NOT_FOUND, _path.parent());
}
const Shared::URIs& uris = _engine.world()->uris();
@@ -112,7 +112,7 @@ CreatePort::pre_process()
_engine.world()->forge().make(old_n_ports)));
} else if (index_i->second.type() != uris.forge.Int ||
index_i->second.get_int32() != old_n_ports) {
- return Event::pre_process_done(BAD_INDEX);
+ return Event::pre_process_done(BAD_INDEX, _path);
}
const PropIter poly_i = _properties.find(uris.ingen_polyphonic);
@@ -123,7 +123,7 @@ CreatePort::pre_process()
if (!(_patch_port = _patch->create_port(
*_engine.buffer_factory(), _path.symbol(),
_port_type, _buf_type, buf_size, _is_output, polyphonic))) {
- return Event::pre_process_done(CREATION_FAILED);
+ return Event::pre_process_done(CREATION_FAILED, _path);
}
_patch_port->properties().insert(_properties.begin(), _properties.end());
@@ -174,8 +174,7 @@ CreatePort::execute(ProcessContext& context)
void
CreatePort::post_process()
{
- respond(_status);
- if (!_status) {
+ if (!respond()) {
_engine.broadcaster()->put(_path, _update);
}