From 962ccb7d2de24ff467bb6c6be845c65142022e0b Mon Sep 17 00:00:00 2001 From: sletz Date: Thu, 23 Aug 2007 08:38:15 +0000 Subject: [PATCH] Fix a bug in jack_test. Correct JackShmMem destructor. Correct and case in JackClient::Execute. Correct JackMachSemaphore::Disconnect. git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@1527 0c269be4-1314-0410-8aa9-9f06e86f4224 --- ChangeLog | 4 ++++ common/JackClient.cpp | 2 +- common/JackLibClient.cpp | 2 +- common/JackShmMem.h | 8 ++------ macosx/JackMachSemaphore.cpp | 1 + tests/jack_test.cpp | 2 +- 6 files changed, 10 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 701ed611..fdea77cc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,10 @@ Jackdmp changes log --------------------------- +2007-08-23 Stephane Letz + + * Fix a bug in jack_test. Correct JackShmMem destructor. Correct and case in JackClient::Execute. Correct JackMachSemaphore::Disconnect. + 2007-08-22 Stephane Letz * Fix a bug in JackLibClient::Open introduced when adding automatic client renaming. diff --git a/common/JackClient.cpp b/common/JackClient.cpp index 8e1fba96..12ab8f9f 100644 --- a/common/JackClient.cpp +++ b/common/JackClient.cpp @@ -372,8 +372,8 @@ end: // Hum... not sure about this, the following "close" code is called in the RT thread... int result; fThread->DropRealTime(); + GetClientControl()->fActive = false; fChannel->ClientDeactivate(GetClientControl()->fRefNum, &result); - Close(); // Not sure... return false; error: diff --git a/common/JackLibClient.cpp b/common/JackLibClient.cpp index 73b8425d..37b8f278 100644 --- a/common/JackLibClient.cpp +++ b/common/JackLibClient.cpp @@ -114,7 +114,7 @@ int JackLibClient::Open(const char* name, jack_options_t options, jack_status_t* goto error; } - JackLog("JackLibClient::Open name = %s refnum = %ld\n", name_res, fClientControl->fRefNum); + JackLog("JackLibClient::Open name = %s refnum = %ld\n", name_res, fClientControl->fRefNum); return 0; error: diff --git a/common/JackShmMem.h b/common/JackShmMem.h index b9f15008..128fcbf0 100644 --- a/common/JackShmMem.h +++ b/common/JackShmMem.h @@ -73,9 +73,7 @@ class JackMem {} virtual ~JackMem() - { - UnlockMemoryImp(this, fSize); - } + {} void LockMemory() { @@ -118,9 +116,7 @@ class JackShmMem } virtual ~JackShmMem() - { - UnlockMemoryImp(this, fInfo.size); - } + {} int GetShmIndex() { diff --git a/macosx/JackMachSemaphore.cpp b/macosx/JackMachSemaphore.cpp index aa57902d..6a7b21ba 100644 --- a/macosx/JackMachSemaphore.cpp +++ b/macosx/JackMachSemaphore.cpp @@ -171,6 +171,7 @@ bool JackMachSemaphore::Disconnect() { if (fSemaphore > 0) { JackLog("JackMachSemaphore::Disconnect name = %s\n", fName); + fSemaphore = 0; } // Nothing to do return true; diff --git a/tests/jack_test.cpp b/tests/jack_test.cpp index a95cf872..6e6f3c1a 100644 --- a/tests/jack_test.cpp +++ b/tests/jack_test.cpp @@ -596,9 +596,9 @@ int main (int argc, char *argv[]) client2 = jack_client_open(client_name1, jack_options, &status, server_name); if (client2 != NULL) { Log ("valid : a second client with the same name can be registered (client automatic renaming)\n"); + jack_client_close(client2); } else { printf("!!! ERROR !!! Jackd server automatic renaming feature does not work!"); - jack_client_close(client2); } /**