Browse Source

Call init callback in notification thread also.

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@2331 0c269be4-1314-0410-8aa9-9f06e86f4224
tags/1.90
sletz 17 years ago
parent
commit
ae0a1ebd28
5 changed files with 15 additions and 7 deletions
  1. +1
    -0
      ChangeLog
  2. +2
    -2
      common/JackSocketClientChannel.cpp
  3. +8
    -1
      macosx/JackMachClientChannel.cpp
  4. +1
    -0
      macosx/JackMachClientChannel.h
  5. +3
    -4
      windows/JackWinNamedPipeClientChannel.cpp

+ 1
- 0
ChangeLog View File

@@ -24,6 +24,7 @@ Fernando Lopez-Lezcano

* Use StartSync to start the client notification thread, otherwise initial notifications from the server may be lost.
* Tim Blechmann JackEngine cleanup patch.
* Call init callback in notification thread also.

2008-05-22 Stephane Letz <letz@grame.fr>



+ 2
- 2
common/JackSocketClientChannel.cpp View File

@@ -289,7 +289,7 @@ void JackSocketClientChannel::InternalClientUnload(int refnum, int int_ref, int*

bool JackSocketClientChannel::Init()
{
jack_log("JackSocketClientChannel::Init ");
jack_log("JackSocketClientChannel::Init");
fNotificationSocket = fNotificationListenSocket.Accept();
// No more needed
fNotificationListenSocket.Close();
@@ -298,7 +298,7 @@ bool JackSocketClientChannel::Init()
jack_error("JackSocketClientChannel: cannot establish notication socket");
return false;
} else {
return true;
return fClient->Init();
}
}



+ 8
- 1
macosx/JackMachClientChannel.cpp View File

@@ -302,12 +302,19 @@ void JackMachClientChannel::InternalClientUnload(int refnum, int int_ref, int* s
}
}

bool JackMachClientChannel::Init()
{
jack_log("JackMachClientChannel::Init");
JackClient* client = JackLibGlobals::fGlobals->fClientTable[fClientPort.GetPort()];
return client->Init();
}

bool JackMachClientChannel::Execute()
{
kern_return_t res;
if ((res = mach_msg_server(JackRPCClient_server, 1024, fClientPort.GetPort(), 0)) != KERN_SUCCESS) {
jack_error("JackMachClientChannel::Execute err = %s", mach_error_string(res));
//fClient->ShutDown();
fClient->ShutDown();
return false;
} else {
return true;


+ 1
- 0
macosx/JackMachClientChannel.h View File

@@ -84,6 +84,7 @@ class JackMachClientChannel : public JackClientChannelInterface, public JackRunn
void InternalClientUnload(int refnum, int int_ref, int* status, int* result);

// JackRunnableInterface interface
bool Init();
bool Execute();
};



+ 3
- 4
windows/JackWinNamedPipeClientChannel.cpp View File

@@ -291,13 +291,13 @@ void JackWinNamedPipeClientChannel::InternalClientUnload(int refnum, int int_ref

bool JackWinNamedPipeClientChannel::Init()
{
jack_log("JackWinNamedPipeClientChannel::Init ");
jack_log("JackWinNamedPipeClientChannel::Init");

if (!fNotificationListenPipe.Accept()) {
jack_error("JackWinNamedPipeClientChannel: cannot establish notification pipe");
return false;
} else {
return true;
return fClient->Init();
}
}

@@ -324,8 +324,7 @@ bool JackWinNamedPipeClientChannel::Execute()
return true;

error:

//fClient->ShutDown(); needed ??
fClient->ShutDown();
return false;
}



Loading…
Cancel
Save