Browse Source

Reworked Torben Hohn fix for server restart issue on Windows.

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@3537 0c269be4-1314-0410-8aa9-9f06e86f4224
tags/v1.9.3
sletz 17 years ago
parent
commit
780e0439a3
3 changed files with 10 additions and 5 deletions
  1. +4
    -0
      ChangeLog
  2. +3
    -2
      windows/JackWinNamedPipeClientChannel.cpp
  3. +3
    -3
      windows/JackWinSemaphore.cpp

+ 4
- 0
ChangeLog View File

@@ -25,6 +25,10 @@ Paul Davis
Jackdmp changes log
---------------------------

2009-05-13 Stephane Letz <letz@grame.fr>
* Reworked Torben Hohn fix for server restart issue on Windows.

2009-05-11 Stephane Letz <letz@grame.fr>
* New jack_free function added in jack.h.


+ 3
- 2
windows/JackWinNamedPipeClientChannel.cpp View File

@@ -311,7 +311,6 @@ bool JackWinNamedPipeClientChannel::Execute()
JackResult res;

if (event.Read(&fNotificationListenPipe) < 0) {
fNotificationListenPipe.Close();
jack_error("JackWinNamedPipeClientChannel read fail");
goto error;
}
@@ -320,7 +319,6 @@ bool JackWinNamedPipeClientChannel::Execute()

if (event.fSync) {
if (res.Write(&fNotificationListenPipe) < 0) {
fNotificationListenPipe.Close();
jack_error("JackWinNamedPipeClientChannel write fail");
goto error;
}
@@ -328,6 +326,9 @@ bool JackWinNamedPipeClientChannel::Execute()
return true;

error:
// Close the pipes, server wont be able to create them otherwise.
fNotificationListenPipe.Close();
fRequestPipe.Close();
fClient->ShutDown();
return false;
}


+ 3
- 3
windows/JackWinSemaphore.cpp View File

@@ -137,9 +137,9 @@ bool JackWinSemaphore::Allocate(const char* name, const char* server_name, int v
return false;
} else if (GetLastError() == ERROR_ALREADY_EXISTS) {
jack_error("Allocate: named semaphore already exist name = %s", fName);
CloseHandle(fSemaphore);
fSemaphore = NULL;
return false;
// Try to open it
fSemaphore = OpenSemaphore(SEMAPHORE_ALL_ACCESS, FALSE, fName);
return (fSemaphore != NULL);
} else {
return true;
}


Loading…
Cancel
Save