Browse Source

Compilation on Windows

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@1509 0c269be4-1314-0410-8aa9-9f06e86f4224
tags/0.64
sletz 18 years ago
parent
commit
b42496ea8d
3 changed files with 25 additions and 15 deletions
  1. +22
    -12
      windows/JackWinNamedPipeClientChannel.cpp
  2. +1
    -1
      windows/JackWinNamedPipeClientChannel.h
  3. +2
    -2
      windows/JackWinNamedPipeServerChannel.cpp

+ 22
- 12
windows/JackWinNamedPipeClientChannel.cpp View File

@@ -36,26 +36,36 @@ JackWinNamedPipeClientChannel::~JackWinNamedPipeClientChannel()
delete fThread;
}

int JackWinNamedPipeClientChannel::Open(const char* name, JackClient* obj, jack_options_t options, jack_status_t* status)
{
int JackWinNamedPipeClientChannel::Open(const char* name, char* name_res, JackClient* obj, jack_options_t options, jack_status_t* status)
{
int result = 0;
JackLog("JackWinNamedPipeClientChannel::Open name = %s\n", name);

/*
16/08/07: was called before doing "fRequestPipe.Connect" .... still necessary?
if (fNotificationListenPipe.Bind(jack_client_dir, name, 0) < 0) {
jack_error("Cannot bind pipe");
goto error;
}
}
*/
// Check name in server
ClientCheck(name, name_res, (int)options, (int*)status, &result);
if (result < 0) {
jack_error("Client name = %s conflits with another running client", name);
goto error;
}

if (fRequestPipe.Connect(jack_server_dir, 0) < 0) {
jack_error("Cannot connect to server pipe");
goto error;
}
}
// Check name in server
ClientCheck(name, name_res, (int)options, (int*)status, &result);
if (result < 0) {
jack_error("Client name = %s conflits with another running client", name);
goto error;
}
if (fNotificationListenPipe.Bind(jack_client_dir, name_res, 0) < 0) {
jack_error("Cannot bind pipe");
goto error;
}

fClient = obj;
return 0;


+ 1
- 1
windows/JackWinNamedPipeClientChannel.h View File

@@ -50,7 +50,7 @@ class JackWinNamedPipeClientChannel : public JackClientChannelInterface, public
JackWinNamedPipeClientChannel();
virtual ~JackWinNamedPipeClientChannel();

int Open(const char* name, JackClient* obj, jack_options_t options, jack_status_t* status);
int Open(const char* name, char* name_res, JackClient* obj, jack_options_t options, jack_status_t* status);
void Close();

int Start();


+ 2
- 2
windows/JackWinNamedPipeServerChannel.cpp View File

@@ -111,9 +111,9 @@ int JackClientPipeThread::HandleRequest()
JackLog("JackRequest::kClientCheck\n");
JackClientCheckRequest req;
JackClientCheckResult res;
if (req.Read(socket) == 0)
if (req.Read(fPipe) == 0)
res.fResult = fServer->GetEngine()->ClientCheck(req.fName, res.fName, req.fOptions, &res.fStatus);
res.Write(socket);
res.Write(fPipe);
break;
}


Loading…
Cancel
Save