Commit ef38cd34 authored by sletz's avatar sletz
Browse files

Correct JackMessageBuffer::SetInitCallback.

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@4746 0c269be4-1314-0410-8aa9-9f06e86f4224
parent 40a63dc7
......@@ -44,8 +44,12 @@ JackMessageBuffer::~JackMessageBuffer()
bool JackMessageBuffer::Start()
{
fRunning = true;
return fThread.StartSync();
if (fThread.StartSync() == 0) {
fRunning = true;
return true;
} else {
return false;
}
}
bool JackMessageBuffer::Stop()
......@@ -157,7 +161,7 @@ void JackMessageBufferAdd(int level, const char *message)
void JackMessageBuffer::SetInitCallback(JackThreadInitCallback callback, void *arg)
{
if (fInstance && fGuard.Lock()) {
if (fInstance && fInit && fGuard.Lock()) {
/* set up the callback */
fInitArg = arg;
fInit = callback;
......
......@@ -134,8 +134,9 @@ bool JackWinProcessSync::LockedTimedWait(long usec)
HANDLE handles[] = { fMutex, fEvent };
DWORD res = WaitForMultipleObjects(2, handles, true, usec / 1000);
if ((res != WAIT_OBJECT_0) && (res != WAIT_TIMEOUT))
jack_error("ackWinProcessSync::LockedTimedWait WaitForMultipleObjects err = %d", GetLastError());
if ((res != WAIT_OBJECT_0) && (res != WAIT_TIMEOUT)) {
jack_error("JackWinProcessSync::LockedTimedWait WaitForMultipleObjects err = %d", GetLastError());
}
if (!ResetEvent(fEvent)) {
jack_error("JackWinProcessSync::LockedTimedWait ResetEvent err = %d", GetLastError());
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment