Browse Source

Back to old method of server channel close on OSX pre Snow Leopard systems.

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@3855 0c269be4-1314-0410-8aa9-9f06e86f4224
tags/v1.9.5
sletz 16 years ago
parent
commit
01805ee735
2 changed files with 9 additions and 0 deletions
  1. +5
    -0
      macosx/JackMachServerChannel.cpp
  2. +4
    -0
      macosx/JackMachServerNotifyChannel.cpp

+ 5
- 0
macosx/JackMachServerChannel.cpp View File

@@ -58,7 +58,12 @@ int JackMachServerChannel::Open(const char* server_name, JackServer* server)
void JackMachServerChannel::Close() void JackMachServerChannel::Close()
{ {
jack_log("JackMachServerChannel::Close"); jack_log("JackMachServerChannel::Close");
#ifdef MAC_OS_X_VERSION_10_5
// Exception does not work in this case on pre Snow Loopard systems, see JackMachServerNotifyChannel::NotifyQuit()
fThread.Kill();
#else
fThread.Stop(); fThread.Stop();
#endif
fServerPort.DestroyPort(); fServerPort.DestroyPort();
} }


+ 4
- 0
macosx/JackMachServerNotifyChannel.cpp View File

@@ -55,10 +55,14 @@ void JackMachServerNotifyChannel::Notify(int refnum, int notify, int value)
void JackMachServerNotifyChannel::NotifyQuit() void JackMachServerNotifyChannel::NotifyQuit()
{ {
#ifdef MAC_OS_X_VERSION_10_5
// Nothing : since exception does not work in this case on pre Snow Loopard systems, see JackMachServerChannel::Close()
#else
kern_return_t res = rpc_jack_client_rt_notify(fClientPort.GetPort(), -1, kQUIT, 0, 0); kern_return_t res = rpc_jack_client_rt_notify(fClientPort.GetPort(), -1, kQUIT, 0, 0);
if (res != KERN_SUCCESS) { if (res != KERN_SUCCESS) {
jack_error("Could not write request ref = %d notify = %d err = %s", -1, kQUIT, mach_error_string(res)); jack_error("Could not write request ref = %d notify = %d err = %s", -1, kQUIT, mach_error_string(res));
} }
#endif
} }


} // end of namespace } // end of namespace


Loading…
Cancel
Save