git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@2331 0c269be4-1314-0410-8aa9-9f06e86f4224tags/1.90
| @@ -24,6 +24,7 @@ Fernando Lopez-Lezcano | |||||
| * Use StartSync to start the client notification thread, otherwise initial notifications from the server may be lost. | * Use StartSync to start the client notification thread, otherwise initial notifications from the server may be lost. | ||||
| * Tim Blechmann JackEngine cleanup patch. | * Tim Blechmann JackEngine cleanup patch. | ||||
| * Call init callback in notification thread also. | |||||
| 2008-05-22 Stephane Letz <letz@grame.fr> | 2008-05-22 Stephane Letz <letz@grame.fr> | ||||
| @@ -289,7 +289,7 @@ void JackSocketClientChannel::InternalClientUnload(int refnum, int int_ref, int* | |||||
| bool JackSocketClientChannel::Init() | bool JackSocketClientChannel::Init() | ||||
| { | { | ||||
| jack_log("JackSocketClientChannel::Init "); | |||||
| jack_log("JackSocketClientChannel::Init"); | |||||
| fNotificationSocket = fNotificationListenSocket.Accept(); | fNotificationSocket = fNotificationListenSocket.Accept(); | ||||
| // No more needed | // No more needed | ||||
| fNotificationListenSocket.Close(); | fNotificationListenSocket.Close(); | ||||
| @@ -298,7 +298,7 @@ bool JackSocketClientChannel::Init() | |||||
| jack_error("JackSocketClientChannel: cannot establish notication socket"); | jack_error("JackSocketClientChannel: cannot establish notication socket"); | ||||
| return false; | return false; | ||||
| } else { | } else { | ||||
| return true; | |||||
| return fClient->Init(); | |||||
| } | } | ||||
| } | } | ||||
| @@ -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() | bool JackMachClientChannel::Execute() | ||||
| { | { | ||||
| kern_return_t res; | kern_return_t res; | ||||
| if ((res = mach_msg_server(JackRPCClient_server, 1024, fClientPort.GetPort(), 0)) != KERN_SUCCESS) { | if ((res = mach_msg_server(JackRPCClient_server, 1024, fClientPort.GetPort(), 0)) != KERN_SUCCESS) { | ||||
| jack_error("JackMachClientChannel::Execute err = %s", mach_error_string(res)); | jack_error("JackMachClientChannel::Execute err = %s", mach_error_string(res)); | ||||
| //fClient->ShutDown(); | |||||
| fClient->ShutDown(); | |||||
| return false; | return false; | ||||
| } else { | } else { | ||||
| return true; | return true; | ||||
| @@ -84,6 +84,7 @@ class JackMachClientChannel : public JackClientChannelInterface, public JackRunn | |||||
| void InternalClientUnload(int refnum, int int_ref, int* status, int* result); | void InternalClientUnload(int refnum, int int_ref, int* status, int* result); | ||||
| // JackRunnableInterface interface | // JackRunnableInterface interface | ||||
| bool Init(); | |||||
| bool Execute(); | bool Execute(); | ||||
| }; | }; | ||||
| @@ -291,13 +291,13 @@ void JackWinNamedPipeClientChannel::InternalClientUnload(int refnum, int int_ref | |||||
| bool JackWinNamedPipeClientChannel::Init() | bool JackWinNamedPipeClientChannel::Init() | ||||
| { | { | ||||
| jack_log("JackWinNamedPipeClientChannel::Init "); | |||||
| jack_log("JackWinNamedPipeClientChannel::Init"); | |||||
| if (!fNotificationListenPipe.Accept()) { | if (!fNotificationListenPipe.Accept()) { | ||||
| jack_error("JackWinNamedPipeClientChannel: cannot establish notification pipe"); | jack_error("JackWinNamedPipeClientChannel: cannot establish notification pipe"); | ||||
| return false; | return false; | ||||
| } else { | } else { | ||||
| return true; | |||||
| return fClient->Init(); | |||||
| } | } | ||||
| } | } | ||||
| @@ -324,8 +324,7 @@ bool JackWinNamedPipeClientChannel::Execute() | |||||
| return true; | return true; | ||||
| error: | error: | ||||
| //fClient->ShutDown(); needed ?? | |||||
| fClient->ShutDown(); | |||||
| return false; | return false; | ||||
| } | } | ||||