- if (threadNode.eventSent && (threadNode.size <= size) &&
- status == epicsEventOK)
+ // even if status == epicsEventTimeout it may still be that we
+ // have received a message
+ if (threadNode.eventSent && threadNode.size <= size && status != epicsEventError)
return threadNode.size;
return -1;
}
I think the bug is to rely on the return value of epicsEventWaitW ithTimeout. Try the following patch. A similar fix may be needed in function mySend.
diff --git a/modules/ libcom/ src/osi/ os/default/ osdMessageQueue .cpp b/modules/ libcom/ src/osi/ os/default/ osdMessageQueue .cpp .eb615a8d0 100644 libcom/ src/osi/ os/default/ osdMessageQueue .cpp libcom/ src/osi/ os/default/ osdMessageQueue .cpp epicsMessageQue ueId pmsg, void *message, unsigned int size,
index c86d8cc2b.
--- a/modules/
+++ b/modules/
@@ -352,8 +352,9 @@ myReceive(
epicsMutex Unlock( pmsg->mutex) ;
- if (threadNode. eventSent && (threadNode.size <= size) && eventSent && threadNode.size <= size && status != epicsEventError)
- status == epicsEventOK)
+ // even if status == epicsEventTimeout it may still be that we
+ // have received a message
+ if (threadNode.
return threadNode.size;
return -1;
}