Browse Source

Correct JackEngine::ClientCloseAux (when called from JackEngine::ClientExternalOpen). Correct JackWinEvent::Allocate.

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@1502 0c269be4-1314-0410-8aa9-9f06e86f4224
tags/0.64
sletz 18 years ago
parent
commit
fb08bdf89d
3 changed files with 15 additions and 7 deletions
  1. +4
    -0
      ChangeLog
  2. +10
    -7
      common/JackEngine.cpp
  3. +1
    -0
      windows/JackWinEvent.cpp

+ 4
- 0
ChangeLog View File

@@ -1,6 +1,10 @@
--------------------------- ---------------------------
Jackdmp changes log Jackdmp changes log
--------------------------- ---------------------------
2007-07-27 Stephane Letz <letz@grame.fr>
* Correct JackEngine::ClientCloseAux (when called from JackEngine::ClientExternalOpen). Correct JackWinEvent::Allocate.


2007-07-20 Stephane Letz <letz@grame.fr> 2007-07-20 Stephane Letz <letz@grame.fr>




+ 10
- 7
common/JackEngine.cpp View File

@@ -483,27 +483,30 @@ int JackEngine::ClientInternalCloseIm(int refnum)


int JackEngine::ClientCloseAux(int refnum, JackClientInterface* client, bool wait) 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 // Remove the client from the table
fClientTable[refnum] = NULL;
fClientTable[refnum] = NULL;


// Remove ports // Remove ports
fGraphManager->RemoveAllPorts(refnum);
fGraphManager->RemoveAllPorts(refnum);


// Wait until next cycle to be sure client is not used anymore // Wait until next cycle to be sure client is not used anymore
if (wait) { 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 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); 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... // Cleanup...
fSynchroTable[refnum]->Destroy(); fSynchroTable[refnum]->Destroy();
fEngineTiming->ResetRollingUsecs();
fEngineTiming->ResetRollingUsecs();
return 0; return 0;
} }




+ 1
- 0
windows/JackWinEvent.cpp View File

@@ -137,6 +137,7 @@ bool JackWinEvent::Allocate(const char* name, int value)
} else if (GetLastError() == ERROR_ALREADY_EXISTS) { } else if (GetLastError() == ERROR_ALREADY_EXISTS) {
jack_error("Allocate: named event already exist name = %s", fName); jack_error("Allocate: named event already exist name = %s", fName);
CloseHandle(fEvent); CloseHandle(fEvent);
fEvent = NULL;
return false; return false;
} else { } else {
return true; return true;


Loading…
Cancel
Save