From b853b3dde1f7028dd275f78433a6ad9b5b9f61c7 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 8 Sep 2006 23:15:42 +0000 Subject: More cleanups git-svn-id: http://svn.drobilla.net/lad/ingen@122 a436a847-0d15-0410-975c-d299462d15a1 --- src/libs/engine/OSCClientSender.cpp | 9 +++++++++ src/libs/engine/OSCClientSender.h | 2 ++ src/libs/engine/OSCResponder.cpp | 4 ++-- 3 files changed, 13 insertions(+), 2 deletions(-) (limited to 'src/libs/engine') 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; } -- cgit v1.2.1