|
|
@@ -483,27 +483,30 @@ int JackEngine::ClientInternalCloseIm(int refnum) |
|
|
|
|
|
|
|
int JackEngine::ClientCloseAux(int refnum, JackClientInterface* client, bool wait) |
|
|
|
{ |
|
|
|
JackLog("JackEngine::ClientCloseAux ref = %ld name = %s\n", refnum, client->GetClientControl()->fName); |
|
|
|
JackLog("JackEngine::ClientCloseAux ref = %ld name = %s\n",
|
|
|
|
refnum,
|
|
|
|
(client->GetClientControl()) ? client->GetClientControl()->fName : "No name"); |
|
|
|
|
|
|
|
// Remove the client from the table |
|
|
|
fClientTable[refnum] = NULL; |
|
|
|
fClientTable[refnum] = NULL;
|
|
|
|
|
|
|
|
// Remove ports |
|
|
|
fGraphManager->RemoveAllPorts(refnum); |
|
|
|
fGraphManager->RemoveAllPorts(refnum);
|
|
|
|
|
|
|
|
// Wait until next cycle to be sure client is not used anymore |
|
|
|
if (wait) { |
|
|
|
if (!fSignal->TimedWait(fEngineControl->fTimeOutUsecs * 2)) { // Must wait at least until a switch occurs in Process, even in case of graph end failure |
|
|
|
jack_error("JackEngine::ClientCloseAux wait error ref = %ld", refnum); |
|
|
|
} |
|
|
|
} |
|
|
|
}
|
|
|
|
|
|
|
|
// Notify running clients |
|
|
|
NotifyRemoveClient(client->GetClientControl()->fName, client->GetClientControl()->fRefNum); |
|
|
|
// Notify running clients
|
|
|
|
if (client->GetClientControl()) // When called in erro cases, client may not be completrly allocated |
|
|
|
NotifyRemoveClient(client->GetClientControl()->fName, client->GetClientControl()->fRefNum);
|
|
|
|
|
|
|
|
// Cleanup... |
|
|
|
fSynchroTable[refnum]->Destroy(); |
|
|
|
fEngineTiming->ResetRollingUsecs(); |
|
|
|
fEngineTiming->ResetRollingUsecs();
|
|
|
|
return 0; |
|
|
|
} |
|
|
|
|
|
|
|