Browse Source

Dont try to use ports above 32767 for OSC

Signed-off-by: falkTX <falktx@falktx.com>
tags/v2.1-alpha2
falkTX 5 years ago
parent
commit
9a96aceeee
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
3 changed files with 6 additions and 6 deletions
  1. +2
    -2
      source/backend/CarlaBackend.h
  2. +2
    -2
      source/backend/engine/CarlaEngineOsc.cpp
  3. +2
    -2
      source/frontend/carla_backend.py

+ 2
- 2
source/backend/CarlaBackend.h View File

@@ -1145,7 +1145,7 @@ typedef enum {
* The network TCP port to use for OSC. * The network TCP port to use for OSC.
* A value of 0 means use a random port. * A value of 0 means use a random port.
* A value of < 0 means to not enable the TCP port for OSC. * 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, 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 use a random port.
* A value of < 0 means to not enable the UDP port for OSC. * A value of < 0 means to not enable the UDP port for OSC.
* @note Disabling this option prevents DSSI UIs from working! * @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, ENGINE_OPTION_OSC_PORT_UDP = 15,




+ 2
- 2
source/backend/engine/CarlaEngineOsc.cpp View File

@@ -95,7 +95,7 @@ void CarlaEngineOsc::init(const char* const name, int tcpPort, int udpPort) noex
{ {
char strBuf[0xff]; 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); std::snprintf(strBuf, 0xff-1, "%d", tcpPort);
strBuf[0xff-1] = '\0'; strBuf[0xff-1] = '\0';
@@ -127,7 +127,7 @@ void CarlaEngineOsc::init(const char* const name, int tcpPort, int udpPort) noex
{ {
char strBuf[0xff]; 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); std::snprintf(strBuf, 0xff-1, "%d", udpPort);
strBuf[0xff-1] = '\0'; strBuf[0xff-1] = '\0';


+ 2
- 2
source/frontend/carla_backend.py View File

@@ -826,14 +826,14 @@ ENGINE_OPTION_OSC_ENABLED = 13
# The network TCP port to use for OSC. # The network TCP port to use for OSC.
# A value of 0 means use a random port. # A value of 0 means use a random port.
# A value of < 0 means to not enable the TCP port for OSC. # 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 ENGINE_OPTION_OSC_PORT_TCP = 14


# The network UDP port to use for OSC. # The network UDP port to use for OSC.
# A value of 0 means use a random port. # A value of 0 means use a random port.
# A value of < 0 means to not enable the UDP port for OSC. # A value of < 0 means to not enable the UDP port for OSC.
# @note Disabling this option prevents DSSI UIs from working! # @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 ENGINE_OPTION_OSC_PORT_UDP = 15


# Set path used for a specific plugin type. # Set path used for a specific plugin type.


Loading…
Cancel
Save