summaryrefslogtreecommitdiff
path: root/src/messagehandler.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2013-10-06 13:10:00 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2013-10-06 13:10:00 +0200
commit88a906395ba7d33ae563e70d8b94c855e3b5a573 (patch)
treeb0fa632b4c59d276b292407f79ee07aa9ef8dab8 /src/messagehandler.cc
parent5727436afe5a8b1b60d99863cfc939ee50d4c17e (diff)
Refactoring of AudioFile loading and message passing from engine to gui and vice versa.
Diffstat (limited to 'src/messagehandler.cc')
-rw-r--r--src/messagehandler.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/messagehandler.cc b/src/messagehandler.cc
index dcaf5f1..52a89a5 100644
--- a/src/messagehandler.cc
+++ b/src/messagehandler.cc
@@ -73,16 +73,17 @@ bool MessageHandler::sendMessage(message_receiver_id_t id, Message* msg)
//DEBUG(msghandler, "Sending message to id %d\n", id);
MessageReceiver *receiver = receivers[id];
-
+ /* // This code causes sporadic segfaults on windows.
if(msg->processing_mode() == Message::FilterMultiple) {
Message *pmsg;
+ MutexAutolock lock(receiver->message_mutex); // Make peek/receive atomic.
while( (pmsg = receiver->peekMessage()) != NULL) {
- if(pmsg->type() != Message::LoadStatus) break;
+ if(pmsg->type() != msg->type()) break;
// Remove all old messages with same type.
delete receiver->receiveMessage();
}
}
-
+ */
receiver->sendMessage(msg);
return true;
}