Changeset 1307


Ignore:
Timestamp:
07/29/08 17:01:23 (6 years ago)
Author:
drobilla
Message:

Don't complain loudly when no client exists to hear responses

(though promiscuity may not be a good idea for 'net usage...)

Location:
ingen/src/libs/engine
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • ingen/src/libs/engine/ClientBroadcaster.cpp

    r1248 r1307  
    8787        return (*i).second; 
    8888    } else { 
    89         cerr << "[ClientBroadcaster] Failed to find client: " << uri << endl; 
    9089        return NULL; 
    9190    } 
  • ingen/src/libs/engine/OSCEngineReceiver.cpp

    r1306 r1307  
    7171 
    7272    // For debugging, print all incoming OSC messages 
    73     //lo_server_add_method(_server, NULL, NULL, generic_cb, NULL); 
     73    lo_server_add_method(_server, NULL, NULL, generic_cb, NULL); 
    7474 
    7575    // Set response address for this message. 
     
    225225 
    226226    /* Different address than last time, have to do a lookup */ 
    227     if (!r || !r->client() || strcmp(url, r->client()->uri().c_str())) 
    228         me->_responder = SharedPtr<Responder>( 
    229                 new Responder(me->_engine.broadcaster()->client(url), id)); 
     227    if (!r || !r->client() || strcmp(url, r->client()->uri().c_str())) { 
     228        ClientInterface* client = me->_engine.broadcaster()->client(url); 
     229        if (client) 
     230            me->_responder = SharedPtr<Responder>(new Responder(client, id)); 
     231        else 
     232            me->_responder = SharedPtr<Responder>(new Responder()); 
     233    } 
    230234     
    231235    if (id != -1) { 
Note: See TracChangeset for help on using the changeset viewer.