diff options
Diffstat (limited to 'src/libs/engine')
-rw-r--r-- | src/libs/engine/OSCClientSender.cpp | 9 | ||||
-rw-r--r-- | src/libs/engine/OSCClientSender.h | 2 | ||||
-rw-r--r-- | src/libs/engine/OSCResponder.cpp | 4 |
3 files changed, 13 insertions, 2 deletions
diff --git a/src/libs/engine/OSCClientSender.cpp b/src/libs/engine/OSCClientSender.cpp index d6f56e74..65fb89fe 100644 --- a/src/libs/engine/OSCClientSender.cpp +++ b/src/libs/engine/OSCClientSender.cpp @@ -78,6 +78,15 @@ namespace Ingen { */ +void +OSCClientSender::response(int32_t id, bool success, const string& msg) +{ + if (lo_send(_address, "/om/response", "iis", id, success ? 1 : 0, msg.c_str()) < 0) { + cerr << "Unable to send response " << id << "! (" + << lo_address_errstr(_address) << ")" << endl; + } +} + /** \page client_osc_namespace * \n diff --git a/src/libs/engine/OSCClientSender.h b/src/libs/engine/OSCClientSender.h index 1826a36d..8427c51a 100644 --- a/src/libs/engine/OSCClientSender.h +++ b/src/libs/engine/OSCClientSender.h @@ -62,6 +62,8 @@ public: void bundle_begin() {} void bundle_end() {} + void response(int32_t id, bool success, const string& msg); + void num_plugins(uint32_t num); void error(const string& msg); diff --git a/src/libs/engine/OSCResponder.cpp b/src/libs/engine/OSCResponder.cpp index d67342d6..50619089 100644 --- a/src/libs/engine/OSCResponder.cpp +++ b/src/libs/engine/OSCResponder.cpp @@ -56,7 +56,7 @@ OSCResponder::respond_ok() _addr = lo_address_new_from_url(_url); //cerr << "OK " << _id << endl; - if (lo_send(_addr, "/om/response/ok", "i", _id) < 0) { + if (lo_send(_addr, "/om/response", "iis", _id, 1, "") < 0) { cerr << "Unable to send response " << _id << "! (" << lo_address_errstr(_addr) << ")" << endl; } @@ -69,7 +69,7 @@ OSCResponder::respond_error(const string& msg) _addr = lo_address_new_from_url(_url); //cerr << "ERR " << _id << endl; - if (lo_send(_addr, "/om/response/error", "is",_id, msg.c_str()) < 0) { + if (lo_send(_addr, "/om/response", "iis",_id, 0, msg.c_str()) < 0) { cerr << "Unable to send response " << _id << "! (" << lo_address_errstr(_addr) << endl; } |