Browse Source

Reduce amount of errors logged whe plugin bridge shm fails

tags/v2.3.0-RC1
falkTX 3 years ago
parent
commit
003c61cd84
2 changed files with 21 additions and 10 deletions
  1. +20
    -9
      source/backend/engine/CarlaEngineBridge.cpp
  2. +1
    -1
      source/bridges-plugin/CarlaBridgePlugin.cpp

+ 20
- 9
source/backend/engine/CarlaEngineBridge.cpp View File

@@ -143,49 +143,56 @@ public:

if (! fShmAudioPool.attachClient(fBaseNameAudioPool))
{
carla_stderr("Failed to attach to audio pool shared memory");
pData->close();
setLastError("Failed to attach to audio pool shared memory");
return false;
}

if (! fShmRtClientControl.attachClient(fBaseNameRtClientControl))
{
pData->close();
clear();
carla_stderr("Failed to attach to rt client control shared memory");
setLastError("Failed to attach to rt client control shared memory");
return false;
}

if (! fShmRtClientControl.mapData())
{
pData->close();
clear();
carla_stderr("Failed to map rt client control shared memory");
setLastError("Failed to map rt client control shared memory");
return false;
}

if (! fShmNonRtClientControl.attachClient(fBaseNameNonRtClientControl))
{
pData->close();
clear();
carla_stderr("Failed to attach to non-rt client control shared memory");
setLastError("Failed to attach to non-rt client control shared memory");
return false;
}

if (! fShmNonRtClientControl.mapData())
{
pData->close();
clear();
carla_stderr("Failed to map non-rt control client shared memory");
setLastError("Failed to map non-rt control client shared memory");
return false;
}

if (! fShmNonRtServerControl.attachClient(fBaseNameNonRtServerControl))
{
pData->close();
clear();
carla_stderr("Failed to attach to non-rt server control shared memory");
setLastError("Failed to attach to non-rt server control shared memory");
return false;
}

if (! fShmNonRtServerControl.mapData())
{
pData->close();
clear();
carla_stderr("Failed to map non-rt control server shared memory");
setLastError("Failed to map non-rt control server shared memory");
return false;
}

@@ -210,7 +217,9 @@ public:
shmNonRtClientDataSize != sizeof(BridgeNonRtClientData) ||
shmNonRtServerDataSize != sizeof(BridgeNonRtServerData))
{
carla_stderr2("CarlaEngineBridge: data size mismatch");
pData->close();
clear();
setLastError("Shared memory data size mismatch");
return false;
}

@@ -222,7 +231,9 @@ public:

if (pData->bufferSize == 0 || carla_isZero(pData->sampleRate))
{
carla_stderr2("CarlaEngineBridge: invalid empty state");
pData->close();
clear();
setLastError("Shared memory has invalid data");
return false;
}



+ 1
- 1
source/bridges-plugin/CarlaBridgePlugin.cpp View File

@@ -239,7 +239,7 @@ public:
{
carla_debug("CarlaBridgePlugin::~CarlaBridgePlugin()");

if (! fUsingExec)
if (fEngine != nullptr && ! fUsingExec)
carla_engine_close(gHostHandle);
}



Loading…
Cancel
Save