Browse Source

Special CATCH_CLOSE_EXCEPTION_RETURN to handle Close API calls.

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@4477 0c269be4-1314-0410-8aa9-9f06e86f4224
tags/1.9.8
sletz 14 years ago
parent
commit
31397ca4d4
2 changed files with 18 additions and 5 deletions
  1. +4
    -0
      ChangeLog
  2. +14
    -5
      common/JackLockedEngine.h

+ 4
- 0
ChangeLog View File

@@ -35,6 +35,10 @@ Chris Caudle
Jackdmp changes log
---------------------------

2011-06-29 Stephane Letz <letz@grame.fr>

* Special CATCH_CLOSE_EXCEPTION_RETURN to handle Close API calls.

2011-06-28 Stephane Letz <letz@grame.fr>

* Another round of code improvements to handle completely buggy Digidesign CoreAudio user-land driver.


+ 14
- 5
common/JackLockedEngine.h View File

@@ -41,17 +41,26 @@ catch (...) {
*/

#define CATCH_EXCEPTION_RETURN \
} catch(std::bad_alloc& e) { \
jack_error("Memory allocation error..."); \
return -1; \
} catch (...) { \
jack_error("Unknown error..."); \
throw; \
} \

#define CATCH_CLOSE_EXCEPTION_RETURN \
} catch(std::bad_alloc& e) { \
jack_error("Memory allocation error..."); \
return -1; \
} catch(JackTemporaryException& e) { \
jack_error("JackTemporaryException : now quits..."); \
JackTools::KillServer(); \
return -1; \
return 0; \
} catch (...) { \
jack_error("Unknown error..."); \
throw; \
} \
}

#define CATCH_EXCEPTION \
} catch(std::bad_alloc& e) { \
@@ -122,15 +131,15 @@ class SERVER_EXPORT JackLockedEngine
{
TRY_CALL
JackLock lock(&fEngine);
return (fEngine.CheckClient(refnum)) ? fEngine.ClientExternalClose(refnum) : - 1;
CATCH_EXCEPTION_RETURN
return (fEngine.CheckClient(refnum)) ? fEngine.ClientExternalClose(refnum) : -1;
CATCH_CLOSE_EXCEPTION_RETURN
}
int ClientInternalClose(int refnum, bool wait)
{
TRY_CALL
JackLock lock(&fEngine);
return (fEngine.CheckClient(refnum)) ? fEngine.ClientInternalClose(refnum, wait) : -1;
CATCH_EXCEPTION_RETURN
CATCH_CLOSE_EXCEPTION_RETURN
}

int ClientActivate(int refnum, bool is_real_time)


Loading…
Cancel
Save