diff options
Diffstat (limited to 'src/messagehandler.cc')
-rw-r--r-- | src/messagehandler.cc | 7 |
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; } |