diff options
author | David Robillard <d@drobilla.net> | 2008-07-30 00:01:23 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2008-07-30 00:01:23 +0000 |
commit | 1ec21143e48f33c40cacac56920792e8fe315e0c (patch) | |
tree | 35c92fc77abae8471aa7a2b2211e25ff17db2bbc | |
parent | 70f982ceb6e7dd29282a8c8f647f8926dc076574 (diff) | |
download | ingen-1ec21143e48f33c40cacac56920792e8fe315e0c.tar.gz ingen-1ec21143e48f33c40cacac56920792e8fe315e0c.tar.bz2 ingen-1ec21143e48f33c40cacac56920792e8fe315e0c.zip |
Don't complain loudly when no client exists to hear responses
(though promiscuity may not be a good idea for 'net usage...)
git-svn-id: http://svn.drobilla.net/lad/ingen@1307 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r-- | src/libs/engine/ClientBroadcaster.cpp | 1 | ||||
-rw-r--r-- | src/libs/engine/OSCEngineReceiver.cpp | 12 |
2 files changed, 8 insertions, 5 deletions
diff --git a/src/libs/engine/ClientBroadcaster.cpp b/src/libs/engine/ClientBroadcaster.cpp index a3e7bc42..bc77cc27 100644 --- a/src/libs/engine/ClientBroadcaster.cpp +++ b/src/libs/engine/ClientBroadcaster.cpp @@ -86,7 +86,6 @@ ClientBroadcaster::client(const string& uri) if (i != _clients.end()) { return (*i).second; } else { - cerr << "[ClientBroadcaster] Failed to find client: " << uri << endl; return NULL; } } diff --git a/src/libs/engine/OSCEngineReceiver.cpp b/src/libs/engine/OSCEngineReceiver.cpp index a27a44ca..120b86b4 100644 --- a/src/libs/engine/OSCEngineReceiver.cpp +++ b/src/libs/engine/OSCEngineReceiver.cpp @@ -70,7 +70,7 @@ OSCEngineReceiver::OSCEngineReceiver(Engine& engine, size_t queue_size, uint16_t } // For debugging, print all incoming OSC messages - //lo_server_add_method(_server, NULL, NULL, generic_cb, NULL); + lo_server_add_method(_server, NULL, NULL, generic_cb, NULL); // Set response address for this message. // It's important this is first and returns nonzero. @@ -224,9 +224,13 @@ OSCEngineReceiver::set_response_address_cb(const char* path, const char* types, const SharedPtr<Responder> r = me->_responder; /* Different address than last time, have to do a lookup */ - if (!r || !r->client() || strcmp(url, r->client()->uri().c_str())) - me->_responder = SharedPtr<Responder>( - new Responder(me->_engine.broadcaster()->client(url), id)); + if (!r || !r->client() || strcmp(url, r->client()->uri().c_str())) { + ClientInterface* client = me->_engine.broadcaster()->client(url); + if (client) + me->_responder = SharedPtr<Responder>(new Responder(client, id)); + else + me->_responder = SharedPtr<Responder>(new Responder()); + } if (id != -1) { me->set_next_response_id(id); |