summaryrefslogtreecommitdiffstats
path: root/src/engine
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine')
-rw-r--r--src/engine/OSCClientSender.hpp6
-rw-r--r--src/engine/OSCEngineReceiver.cpp9
2 files changed, 10 insertions, 5 deletions
diff --git a/src/engine/OSCClientSender.hpp b/src/engine/OSCClientSender.hpp
index a30deb15..6ce8d684 100644
--- a/src/engine/OSCClientSender.hpp
+++ b/src/engine/OSCClientSender.hpp
@@ -41,8 +41,10 @@ class OSCClientSender : public ClientInterface,
public Ingen::Shared::OSCSender
{
public:
- explicit OSCClientSender(const Raul::URI& url)
- : _url(url)
+ explicit OSCClientSender(const Raul::URI& url,
+ size_t max_packet_size)
+ : Shared::OSCSender(max_packet_size)
+ , _url(url)
{
_address = lo_address_new_from_url(url.c_str());
}
diff --git a/src/engine/OSCEngineReceiver.cpp b/src/engine/OSCEngineReceiver.cpp
index bf03b29d..59aac9e4 100644
--- a/src/engine/OSCEngineReceiver.cpp
+++ b/src/engine/OSCEngineReceiver.cpp
@@ -300,7 +300,9 @@ OSCEngineReceiver::_register_client_cb(const char* path, const char* types, lo_a
lo_address addr = lo_message_get_source(msg);
char* const url = lo_address_get_url(addr);
- ClientInterface* client = new OSCClientSender((const char*)url);
+ ClientInterface* client = new OSCClientSender(
+ (const char*)url,
+ _engine.world()->conf()->option("packet-size").get_int32());
register_client(client);
free(url);
@@ -602,12 +604,13 @@ OSCEngineReceiver::unknown_cb(const char* path, const char* types, lo_arg** argv
const lo_address addr = lo_message_get_source(msg);
char* const url = lo_address_get_url(addr);
- warn << "Unknown OSC command " << path << " (" << types << ")" << endl;
+ warn << "Unknown OSC command " << path << " (" << types << ") "
+ << "received from " << url << endl;
string error_msg = "Unknown command: ";
error_msg.append(path).append(" ").append(types);
- OSCClientSender(url).error(error_msg);
+ lo_send(addr, "/error", "s", error_msg.c_str(), LO_ARGS_END);
free(url);
return 0;