Browse Source

Restore old JackWinNamedPipeServer::AcceptClient.

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@4666 0c269be4-1314-0410-8aa9-9f06e86f4224
tags/1.9.9.5
sletz 14 years ago
parent
commit
5257b1d1e1
1 changed files with 10 additions and 9 deletions
  1. +10
    -9
      windows/JackWinNamedPipe.cpp

+ 10
- 9
windows/JackWinNamedPipe.cpp View File

@@ -303,18 +303,19 @@ bool JackWinNamedPipeServer::Accept()
JackWinNamedPipeClient* JackWinNamedPipeServer::AcceptClient() JackWinNamedPipeClient* JackWinNamedPipeServer::AcceptClient()
{ {
if (ConnectNamedPipe(fNamedPipe, NULL)) { if (ConnectNamedPipe(fNamedPipe, NULL)) {
JackWinNamedPipeClient* client = new JackWinNamedPipeClient(fNamedPipe, fName);
// Init the pipe to the default value // Init the pipe to the default value
fNamedPipe = INVALID_HANDLE_VALUE; fNamedPipe = INVALID_HANDLE_VALUE;
return new JackWinNamedPipeClient(fNamedPipe, fName);;
return client;
} else { } else {
jack_error("Cannot connect server pipe name = %s err = %ld", fName, GetLastError());
if (GetLastError() == ERROR_PIPE_CONNECTED) {
jack_error("Pipe already connnected = %s", fName);
// Init the pipe to the default value
fNamedPipe = INVALID_HANDLE_VALUE;
return new JackWinNamedPipeClient(fNamedPipe, fName);
} else {
return NULL;
switch (GetLastError()) {
case ERROR_PIPE_CONNECTED:
return new JackWinNamedPipeClient(fNamedPipe, fName);
default:
jack_error("Cannot connect server pipe name = %s err = %ld", fName, GetLastError());
return NULL;
} }
} }
} }


Loading…
Cancel
Save