From aeed7cfbddc979c5bc668d668052ef96cb5d84c5 Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Thu, 30 Apr 2020 23:55:30 -0500 Subject: [PATCH] osdMessageQueue: This is the mirror of Heinz Junkes' earlier fix When sending a message, if the queue is full so we have to wait, we create a threadNode with an eventNode in it and stick it on the sendQueue, then wait for a receiver to signal that event, waking us. If we awoke due to a timeout but a receiver was actually waking us up anyway (i.e. eventSent was set), we shouldn't give up. --- src/libCom/osi/os/default/osdMessageQueue.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/libCom/osi/os/default/osdMessageQueue.cpp b/src/libCom/osi/os/default/osdMessageQueue.cpp index 0e1d1fc22..cdb3afba9 100644 --- a/src/libCom/osi/os/default/osdMessageQueue.cpp +++ b/src/libCom/osi/os/default/osdMessageQueue.cpp @@ -207,8 +207,7 @@ mySend(epicsMessageQueueId pmsg, void *message, unsigned int size, freeEventNode(pmsg, threadNode.evp, status); - if ((pmsg->full && (ellFirst(&pmsg->receiveQueue) == NULL)) || - status != epicsEventOK) { + if (pmsg->full && (ellFirst(&pmsg->receiveQueue) == NULL)) { epicsMutexUnlock(pmsg->mutex); return -1; }