summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/ObjectSender.cpp14
-rw-r--r--src/server/PortImpl.cpp2
-rw-r--r--src/server/events/SetMetadata.cpp13
3 files changed, 18 insertions, 11 deletions
diff --git a/src/server/ObjectSender.cpp b/src/server/ObjectSender.cpp
index 22aff285..a166a885 100644
--- a/src/server/ObjectSender.cpp
+++ b/src/server/ObjectSender.cpp
@@ -134,11 +134,15 @@ ObjectSender::send_port(ClientInterface* client, const PortImpl* port, bool bund
if (bundle)
client->bundle_begin();
- client->put(port->path(), port->properties());
-
- // Send control value
- if (port->is_a(PortType::CONTROL))
- client->set_property(port->path(), port->bufs().uris().ingen_value, port->value());
+ if (port->is_a(PortType::CONTROL)) {
+ Resource::Properties props = port->properties();
+ props.erase(port->bufs().uris().ingen_value);
+ props.insert(make_pair(port->bufs().uris().ingen_value,
+ port->value()));
+ client->put(port->path(), props);
+ } else {
+ client->put(port->path(), port->properties());
+ }
if (bundle)
client->bundle_end();
diff --git a/src/server/PortImpl.cpp b/src/server/PortImpl.cpp
index a448916e..6ccc4547 100644
--- a/src/server/PortImpl.cpp
+++ b/src/server/PortImpl.cpp
@@ -74,6 +74,8 @@ PortImpl::PortImpl(BufferFactory& bufs,
if (type == PortType::EVENTS)
_broadcast = true; // send activity blips
+ else if (type == PortType::CONTROL)
+ _value = Raul::Atom(0.0f);
}
PortImpl::~PortImpl()
diff --git a/src/server/events/SetMetadata.cpp b/src/server/events/SetMetadata.cpp
index 1812ad91..d9d44cc0 100644
--- a/src/server/events/SetMetadata.cpp
+++ b/src/server/events/SetMetadata.cpp
@@ -346,14 +346,15 @@ SetMetadata::post_process()
switch (_error) {
case NO_ERROR:
- if (_create_event)
+ if (_create_event) {
_create_event->post_process();
- else
+ } else {
_request->respond_ok();
- if (_create)
- _engine.broadcaster()->put(_subject, _properties, _context);
- else
- _engine.broadcaster()->delta(_subject, _remove, _properties);
+ if (_create)
+ _engine.broadcaster()->put(_subject, _properties, _context);
+ else
+ _engine.broadcaster()->delta(_subject, _remove, _properties);
+ }
break;
case NOT_FOUND:
_request->respond_error((boost::format(