From 5acaa886fb6b83519291536f0c22ec3f94b3eefd Mon Sep 17 00:00:00 2001 From: sletz Date: Wed, 30 Apr 2008 21:01:58 +0000 Subject: [PATCH] Cleanup git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@2222 0c269be4-1314-0410-8aa9-9f06e86f4224 --- common/JackException.h | 3 +-- common/JackThreadedDriver.cpp | 20 +++++++++----------- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/common/JackException.h b/common/JackException.h index 37865b88..603c5003 100644 --- a/common/JackException.h +++ b/common/JackException.h @@ -45,7 +45,7 @@ namespace Jack void PrintMessage() { std::string str = what(); - jack_error(str.c_str()); + jack_info(str.c_str()); } }; @@ -58,7 +58,6 @@ namespace Jack JackDriverException(const char* msg) : JackException(msg) {} }; - } #endif diff --git a/common/JackThreadedDriver.cpp b/common/JackThreadedDriver.cpp index 68373935..464c3458 100644 --- a/common/JackThreadedDriver.cpp +++ b/common/JackThreadedDriver.cpp @@ -115,17 +115,15 @@ bool JackThreadedDriver::Init() bool JackRestartThreadedDriver::Execute() { - while (fThread->GetStatus() == JackThread::kRunning) { - try { - // Keep running even in case of error - while (fThread->GetStatus() == JackThread::kRunning) { - Process(); - } - } catch (JackDriverException e) { - e.PrintMessage(); - jack_log("Driver is restarted"); - Init(); - } + try { + // Keep running even in case of error + while (fThread->GetStatus() == JackThread::kRunning) { + Process(); + } + } catch (JackDriverException e) { + e.PrintMessage(); + jack_log("Driver is restarted"); + return Init(); } return false; }