Browse Source

jackbridge: return success if jack_connect returns EEXIST

Signed-off-by: falkTX <falktx@falktx.com>
tags/v2.1-rc1
falkTX 5 years ago
parent
commit
191939cd80
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      source/jackbridge/JackBridge1.cpp

+ 5
- 1
source/jackbridge/JackBridge1.cpp View File

@@ -29,6 +29,7 @@
# define JACKSYM_API # define JACKSYM_API
#endif #endif


#include <cerrno>
#include "CarlaLibUtils.hpp" #include "CarlaLibUtils.hpp"


// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
@@ -1539,7 +1540,10 @@ bool jackbridge_connect(jack_client_t* client, const char* source_port, const ch
return (jack_connect(client, source_port, destination_port) == 0); return (jack_connect(client, source_port, destination_port) == 0);
#else #else
if (getBridgeInstance().connect_ptr != nullptr) if (getBridgeInstance().connect_ptr != nullptr)
return (getBridgeInstance().connect_ptr(client, source_port, destination_port) == 0);
{
const int ret = getBridgeInstance().connect_ptr(client, source_port, destination_port);
return ret == 0 || ret == EEXIST;
}
#endif #endif
return false; return false;
} }


Loading…
Cancel
Save