From 700489b429b0edb7046b169278e3e6751e3e59fc Mon Sep 17 00:00:00 2001 From: Stephane Letz Date: Wed, 24 Oct 2012 13:02:04 +0200 Subject: [PATCH] Move NotifyQuit in JackServer::Stop. --- common/JackLibAPI.cpp | 2 +- common/JackLockedEngine.h | 8 ++++---- common/JackServer.cpp | 2 +- common/JackServerAPI.cpp | 2 +- posix/JackSocketServerChannel.cpp | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/common/JackLibAPI.cpp b/common/JackLibAPI.cpp index 1855e04e..690f62bf 100644 --- a/common/JackLibAPI.cpp +++ b/common/JackLibAPI.cpp @@ -177,7 +177,7 @@ LIB_EXPORT jack_client_t* jack_client_open(const char* ext_client_name, jack_opt va_end(ap); JackGlobals::fOpenMutex->Unlock(); return res; - } catch(std::bad_alloc& e) { + } catch (std::bad_alloc& e) { jack_error("Memory allocation error..."); return NULL; } catch (...) { diff --git a/common/JackLockedEngine.h b/common/JackLockedEngine.h index 9d93f299..a1dc807e 100644 --- a/common/JackLockedEngine.h +++ b/common/JackLockedEngine.h @@ -41,7 +41,7 @@ catch (...) { */ #define CATCH_EXCEPTION_RETURN \ - } catch(std::bad_alloc& e) { \ + } catch (std::bad_alloc& e) { \ jack_error("Memory allocation error..."); \ return -1; \ } catch (...) { \ @@ -50,10 +50,10 @@ catch (...) { } \ #define CATCH_CLOSE_EXCEPTION_RETURN \ - } catch(std::bad_alloc& e) { \ + } catch (std::bad_alloc& e) { \ jack_error("Memory allocation error..."); \ return -1; \ - } catch(JackTemporaryException& e) { \ + } catch (JackTemporaryException& e) { \ jack_error("JackTemporaryException : now quits..."); \ JackTools::KillServer(); \ return 0; \ @@ -63,7 +63,7 @@ catch (...) { } #define CATCH_EXCEPTION \ - } catch(std::bad_alloc& e) { \ + } catch (std::bad_alloc& e) { \ jack_error("Memory allocation error..."); \ } catch (...) { \ jack_error("Unknown error..."); \ diff --git a/common/JackServer.cpp b/common/JackServer.cpp index 8b0cb056..b7e7639a 100644 --- a/common/JackServer.cpp +++ b/common/JackServer.cpp @@ -134,7 +134,6 @@ fail_close1: int JackServer::Close() { jack_log("JackServer::Close"); - fEngine->NotifyQuit(); fChannel.Close(); fAudioDriver->Detach(); fAudioDriver->Close(); @@ -190,6 +189,7 @@ int JackServer::Start() int JackServer::Stop() { jack_log("JackServer::Stop"); + fEngine->NotifyQuit(); fChannel.Stop(); fEngine->ShutDown(); diff --git a/common/JackServerAPI.cpp b/common/JackServerAPI.cpp index 9af1f9d5..ff86dec5 100644 --- a/common/JackServerAPI.cpp +++ b/common/JackServerAPI.cpp @@ -162,7 +162,7 @@ SERVER_EXPORT jack_client_t* jack_client_open(const char* ext_client_name, jack_ va_end(ap); JackGlobals::fOpenMutex->Unlock(); return res; - } catch(std::bad_alloc& e) { + } catch (std::bad_alloc& e) { jack_error("Memory allocation error..."); return NULL; } catch (...) { diff --git a/posix/JackSocketServerChannel.cpp b/posix/JackSocketServerChannel.cpp index 195c41c4..dcc1aa5f 100644 --- a/posix/JackSocketServerChannel.cpp +++ b/posix/JackSocketServerChannel.cpp @@ -97,7 +97,7 @@ int JackSocketServerChannel::Start() void JackSocketServerChannel::Stop() { - fThread.Kill(); + fThread.Stop(); } void JackSocketServerChannel::ClientCreate() -- 2.11.4.GIT