diff --git a/src/ControlManager.cpp b/src/ControlManager.cpp index 98b4129..15a605c 100644 --- a/src/ControlManager.cpp +++ b/src/ControlManager.cpp @@ -191,7 +191,7 @@ void Control::RequestListener::ProcessMessage( const osc::ReceivedMessage& m, else if ( std::regex_match(target, osc_sourceid_reg_exp) ) { int i = 0; - std::string num = target.substr(1); + std::string num = target.substr( target.find("#") == std::string::npos ? 1 : 2 ); if ( BaseToolkit::is_a_number(num, &i)){ Source *s = Mixer::manager().sourceAtIndex(i); if (s) { @@ -201,7 +201,7 @@ void Control::RequestListener::ProcessMessage( const osc::ReceivedMessage& m, Control::manager().sendSourceAttibutes(remoteEndpoint, target, s); } else - Log::Info(CONTROL_OSC_MSG "Unknown target '%s' requested by %s.", target.c_str(), sender); + Log::Info(CONTROL_OSC_MSG "No source at ID %s targetted by %s.", num.c_str(), sender); } } // General case: try to identify the target by name diff --git a/src/ControlManager.h b/src/ControlManager.h index 68c071f..bb9ca97 100644 --- a/src/ControlManager.h +++ b/src/ControlManager.h @@ -27,7 +27,7 @@ #define OSC_ALL "/all" #define OSC_SELECTION "/selection" -#define OSC_SOURCEID "(\\/)[[:digit:]]+$" +#define OSC_SOURCEID "(\\/#?)[[:digit:]]+$" #define OSC_BATCH "(\\/batch#)[[:digit:]]+$" #define OSC_CURRENT "/current" #define OSC_NEXT "/next"