diff options
Diffstat (limited to 'src/libs/engine')
-rw-r--r-- | src/libs/engine/OSCClientSender.cpp | 18 | ||||
-rw-r--r-- | src/libs/engine/ObjectSender.cpp | 6 |
2 files changed, 3 insertions, 21 deletions
diff --git a/src/libs/engine/OSCClientSender.cpp b/src/libs/engine/OSCClientSender.cpp index 0f05e1ed..dca2e0ed 100644 --- a/src/libs/engine/OSCClientSender.cpp +++ b/src/libs/engine/OSCClientSender.cpp @@ -304,28 +304,12 @@ OSCClientSender::new_plugin(const std::string& uri, const std::string& symbol, const std::string& name) { - // FIXME: size? liblo doesn't export this. - // Don't want to exceed max UDP packet size (1500 bytes) - static const size_t MAX_BUNDLE_SIZE = 1500 - 32*5; - lo_message m = lo_message_new(); lo_message_add_string(m, uri.c_str()); lo_message_add_string(m, type_uri.c_str()); lo_message_add_string(m, symbol.c_str()); lo_message_add_string(m, name.c_str()); - - if (_transfer) { - - if (lo_bundle_length(_transfer) + lo_message_length(m, "/ingen/plugin") - > MAX_BUNDLE_SIZE) { - lo_send_bundle(_address, _transfer); - _transfer = lo_bundle_new(LO_TT_IMMEDIATE); - } - lo_bundle_add_message(_transfer, "/ingen/plugin", m); - - } else { - lo_send_message(_address, "/ingen/plugin", m); - } + send_message("/ingen/plugin", m); } diff --git a/src/libs/engine/ObjectSender.cpp b/src/libs/engine/ObjectSender.cpp index bcab46a8..688cea8e 100644 --- a/src/libs/engine/ObjectSender.cpp +++ b/src/libs/engine/ObjectSender.cpp @@ -52,24 +52,22 @@ ObjectSender::send_patch(ClientInterface* client, const PatchImpl* patch, bool r // Send nodes for (List<NodeImpl*>::const_iterator j = patch->nodes().begin(); j != patch->nodes().end(); ++j) { - const NodeImpl* const node = (*j); send_node(client, node, true); } // Send ports for (uint32_t i=0; i < patch->num_ports(); ++i) { - PortImpl* const port = patch->port_impl(i); send_port(client, port); - } // Send connections + client->transfer_begin(); for (PatchImpl::Connections::const_iterator j = patch->connections().begin(); j != patch->connections().end(); ++j) client->connect((*j)->src_port_path(), (*j)->dst_port_path()); - + client->transfer_end(); } } |