summaryrefslogtreecommitdiffstats
path: root/src/libs/engine
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2008-07-29 22:31:09 +0000
committerDavid Robillard <d@drobilla.net>2008-07-29 22:31:09 +0000
commit70f982ceb6e7dd29282a8c8f647f8926dc076574 (patch)
treef05c96d16c1cb934248912ad0ba3a55699e3df78 /src/libs/engine
parent48a23e68b6eb6a23a4bd2e0a1fdfef339eaa7533 (diff)
downloadingen-70f982ceb6e7dd29282a8c8f647f8926dc076574.tar.gz
ingen-70f982ceb6e7dd29282a8c8f647f8926dc076574.tar.bz2
ingen-70f982ceb6e7dd29282a8c8f647f8926dc076574.zip
Fix set_port_value crash when running separate engine w/ OSC.
git-svn-id: http://svn.drobilla.net/lad/ingen@1306 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/engine')
-rw-r--r--src/libs/engine/OSCEngineReceiver.cpp3
-rw-r--r--src/libs/engine/events/SetPortValueEvent.cpp6
2 files changed, 3 insertions, 6 deletions
diff --git a/src/libs/engine/OSCEngineReceiver.cpp b/src/libs/engine/OSCEngineReceiver.cpp
index d9cebba4..a27a44ca 100644
--- a/src/libs/engine/OSCEngineReceiver.cpp
+++ b/src/libs/engine/OSCEngineReceiver.cpp
@@ -24,6 +24,7 @@
#include <raul/SharedPtr.hpp>
#include <raul/AtomLiblo.hpp>
#include "interface/ClientInterface.hpp"
+#include "engine/ThreadManager.hpp"
#include "OSCEngineReceiver.hpp"
#include "QueuedEventSource.hpp"
#include "OSCClientSender.hpp"
@@ -168,6 +169,8 @@ OSCEngineReceiver::deactivate()
void
OSCEngineReceiver::ReceiveThread::_run()
{
+ Thread::get().set_context(THREAD_PRE_PROCESS);
+
/* get a timestamp here and stamp all the events with the same time so
* they all get executed in the same cycle */
diff --git a/src/libs/engine/events/SetPortValueEvent.cpp b/src/libs/engine/events/SetPortValueEvent.cpp
index 267db836..a184bd95 100644
--- a/src/libs/engine/events/SetPortValueEvent.cpp
+++ b/src/libs/engine/events/SetPortValueEvent.cpp
@@ -53,9 +53,6 @@ SetPortValueEvent::SetPortValueEvent(Engine& engine,
, _port(NULL)
, _error(NO_ERROR)
{
- if (!_queued)
- pre_process();
-
memcpy(_data, data, data_size);
}
@@ -80,9 +77,6 @@ SetPortValueEvent::SetPortValueEvent(Engine& engine,
, _port(NULL)
, _error(NO_ERROR)
{
- if (!_queued)
- pre_process();
-
memcpy(_data, data, data_size);
}