OSC: Don't fail if peer scan callback is not set!

This commit is contained in:
Jonathan Moore Liles 2012-04-27 00:17:00 -07:00
parent 16a4c0f51d
commit f816742b65
1 changed files with 6 additions and 3 deletions

View File

@ -306,7 +306,8 @@ namespace OSC
DMESSAGE( "Peer %s has disconnected from signal %s", p->name, ps->path() );
s->_connection_state_callback( s, s->_connection_state_userdata );
if ( s->_connection_state_callback )
s->_connection_state_callback( s, s->_connection_state_userdata );
return 0;
}
@ -358,7 +359,8 @@ namespace OSC
/* make a record of it ourselves */
ps->_outgoing.push_back( s );
s->_connection_state_callback( s, s->_connection_state_userdata );
if ( s->_connection_state_callback )
s->_connection_state_callback( s, s->_connection_state_userdata );
/* return 0; */
/* } */
@ -874,7 +876,8 @@ namespace OSC
p->_scanning = false;
DMESSAGE( "Done scanning %s", p->name );
ep->_peer_scan_complete_callback(ep->_peer_scan_complete_userdata);
if ( ep->_peer_scan_complete_callback )
ep->_peer_scan_complete_callback(ep->_peer_scan_complete_userdata);
}
else if ( argc == 7 && p->_scanning )
{