diff --git a/source/backend/utils/PluginDiscovery.cpp b/source/backend/utils/PluginDiscovery.cpp index c48791f70..24788c0f5 100644 --- a/source/backend/utils/PluginDiscovery.cpp +++ b/source/backend/utils/PluginDiscovery.cpp @@ -458,6 +458,8 @@ private: const CarlaScopedEnvVar sev2("WINEPREFIX", winePrefix.toRawUTF8()); #endif + const CarlaScopedEnvVar sev3("CARLA_DISCOVERY_NO_PROCESSING_CHECKS", "1"); + if (fBinaries.empty()) { if (fBinaryType == CB::BINARY_NATIVE) @@ -522,10 +524,10 @@ private: #ifndef CARLA_OS_WIN if (helperTool.isNotEmpty()) - startPipeServer(helperTool.toRawUTF8(), fDiscoveryTool, getPluginTypeAsString(fPluginType), ":all"); + startPipeServer(helperTool.toRawUTF8(), fDiscoveryTool, getPluginTypeAsString(fPluginType), ":all", -1, 2000); else #endif - startPipeServer(fDiscoveryTool, getPluginTypeAsString(fPluginType), ":all"); + startPipeServer(fDiscoveryTool, getPluginTypeAsString(fPluginType), ":all", -1, 2000); } else { @@ -548,10 +550,10 @@ private: #ifndef CARLA_OS_WIN if (helperTool.isNotEmpty()) - startPipeServer(helperTool.toRawUTF8(), fDiscoveryTool, getPluginTypeAsString(fPluginType), filename.toRawUTF8()); + startPipeServer(helperTool.toRawUTF8(), fDiscoveryTool, getPluginTypeAsString(fPluginType), filename.toRawUTF8(), -1, 2000); else #endif - startPipeServer(fDiscoveryTool, getPluginTypeAsString(fPluginType), filename.toRawUTF8()); + startPipeServer(fDiscoveryTool, getPluginTypeAsString(fPluginType), filename.toRawUTF8(), -1, 2000); } } diff --git a/source/utils/CarlaPipeUtils.cpp b/source/utils/CarlaPipeUtils.cpp index de5644355..b28e59a57 100644 --- a/source/utils/CarlaPipeUtils.cpp +++ b/source/utils/CarlaPipeUtils.cpp @@ -1497,7 +1497,8 @@ bool CarlaPipeServer::startPipeServer(const char* const helperTool, const char* const filename, const char* const arg1, const char* const arg2, - const int size) noexcept + const int size, + int timeOutMilliseconds) noexcept { CARLA_SAFE_ASSERT_RETURN(pData->pipeRecv == INVALID_PIPE_VALUE, false); CARLA_SAFE_ASSERT_RETURN(pData->pipeSend == INVALID_PIPE_VALUE, false); @@ -1512,6 +1513,9 @@ bool CarlaPipeServer::startPipeServer(const char* const helperTool, CARLA_SAFE_ASSERT_RETURN(arg2 != nullptr, false); carla_debug("CarlaPipeServer::startPipeServer(\"%s\", \"%s\", \"%s\")", filename, arg1, arg2); + if (timeOutMilliseconds < 0) + timeOutMilliseconds = 10 * 1000; + char pipeRecvServerStr[100+1]; char pipeSendServerStr[100+1]; char pipeRecvClientStr[100+1]; @@ -1714,7 +1718,7 @@ bool CarlaPipeServer::startPipeServer(const char* const helperTool, void* const process = nullptr; #endif - if (waitForClientFirstMessage(pipeRecvClient, ovRecv, process, 10*1000 /* 10 secs */)) + if (waitForClientFirstMessage(pipeRecvClient, ovRecv, process, timeOutMilliseconds)) { pData->pipeRecv = pipeRecvClient; pData->pipeSend = pipeSendClient; @@ -1768,9 +1772,10 @@ bool CarlaPipeServer::startPipeServer(const char* const helperTool, bool CarlaPipeServer::startPipeServer(const char* const filename, const char* const arg1, const char* const arg2, - const int size) noexcept + const int size, + const int timeOutMilliseconds) noexcept { - return startPipeServer(nullptr, filename, arg1, arg2, size); + return startPipeServer(nullptr, filename, arg1, arg2, size, timeOutMilliseconds); } void CarlaPipeServer::stopPipeServer(const uint32_t timeOutMilliseconds) noexcept diff --git a/source/utils/CarlaPipeUtils.hpp b/source/utils/CarlaPipeUtils.hpp index cafc2d489..dd05d0f65 100644 --- a/source/utils/CarlaPipeUtils.hpp +++ b/source/utils/CarlaPipeUtils.hpp @@ -285,14 +285,15 @@ public: * Start the pipe server using @a filename with 2 arguments. * @see fail() */ - bool startPipeServer(const char* helperTool, - const char* filename, const char* arg1, const char* arg2, int size = -1) noexcept; + bool startPipeServer(const char* helperTool, const char* filename, const char* arg1, const char* arg2, + int size = -1, int timeOutMilliseconds = -1) noexcept; /*! * Start the pipe server using @a filename with 2 arguments. * @see fail() */ - bool startPipeServer(const char* filename, const char* arg1, const char* arg2, int size = -1) noexcept; + bool startPipeServer(const char* filename, const char* arg1, const char* arg2, + int size = -1, int timeOutMilliseconds = -1) noexcept; /*! * Stop the pipe server.