diff --git a/source/backend/CarlaBackend.h b/source/backend/CarlaBackend.h index 82b24c948..7728bee25 100644 --- a/source/backend/CarlaBackend.h +++ b/source/backend/CarlaBackend.h @@ -1145,7 +1145,7 @@ typedef enum { * The network TCP port to use for OSC. * A value of 0 means use a random port. * A value of < 0 means to not enable the TCP port for OSC. - * @note Valid ports begin at 1024 + * @note Valid ports begin at 1024 and end at 32767 (inclusive) */ ENGINE_OPTION_OSC_PORT_TCP = 14, @@ -1154,7 +1154,7 @@ typedef enum { * A value of 0 means use a random port. * A value of < 0 means to not enable the UDP port for OSC. * @note Disabling this option prevents DSSI UIs from working! - * @note Valid ports begin at 1024 + * @note Valid ports begin at 1024 and end at 32767 (inclusive) */ ENGINE_OPTION_OSC_PORT_UDP = 15, diff --git a/source/backend/engine/CarlaEngineOsc.cpp b/source/backend/engine/CarlaEngineOsc.cpp index ecd2263e1..e4bd16704 100644 --- a/source/backend/engine/CarlaEngineOsc.cpp +++ b/source/backend/engine/CarlaEngineOsc.cpp @@ -95,7 +95,7 @@ void CarlaEngineOsc::init(const char* const name, int tcpPort, int udpPort) noex { char strBuf[0xff]; - for (int i=0; i < kRetryAttempts && fServerTCP == nullptr; ++i, ++tcpPort) + for (int i=0; i < kRetryAttempts && tcpPort < 32767 && fServerTCP == nullptr; ++i, ++tcpPort) { std::snprintf(strBuf, 0xff-1, "%d", tcpPort); strBuf[0xff-1] = '\0'; @@ -127,7 +127,7 @@ void CarlaEngineOsc::init(const char* const name, int tcpPort, int udpPort) noex { char strBuf[0xff]; - for (int i=0; i < kRetryAttempts && fServerUDP == nullptr; ++i, ++udpPort) + for (int i=0; i < kRetryAttempts && udpPort < 32768 && fServerUDP == nullptr; ++i, ++udpPort) { std::snprintf(strBuf, 0xff-1, "%d", udpPort); strBuf[0xff-1] = '\0'; diff --git a/source/frontend/carla_backend.py b/source/frontend/carla_backend.py index e3f6554a5..2fce1afcd 100644 --- a/source/frontend/carla_backend.py +++ b/source/frontend/carla_backend.py @@ -826,14 +826,14 @@ ENGINE_OPTION_OSC_ENABLED = 13 # The network TCP port to use for OSC. # A value of 0 means use a random port. # A value of < 0 means to not enable the TCP port for OSC. -# @note Valid ports begin at 1024 +# @note Valid ports begin at 1024 and end at 32767 (inclusive) ENGINE_OPTION_OSC_PORT_TCP = 14 # The network UDP port to use for OSC. # A value of 0 means use a random port. # A value of < 0 means to not enable the UDP port for OSC. # @note Disabling this option prevents DSSI UIs from working! -# @note Valid ports begin at 1024 +# @note Valid ports begin at 1024 and end at 32767 (inclusive) ENGINE_OPTION_OSC_PORT_UDP = 15 # Set path used for a specific plugin type.