From 69ebc1c2323c40db77149c39e2c168546c92c89d Mon Sep 17 00:00:00 2001 From: kpl Date: Sat, 14 Jun 2014 14:38:52 -0700 Subject: [PATCH] cmRtSys.c : If a network msg is received with the destination rtSubIdx set to cmInvalidIdx then send the message to all sub-systems. (See _cmRtSysDeliverSegMsg().). --- cmRtSys.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/cmRtSys.c b/cmRtSys.c index 1981731..e3d8658 100644 --- a/cmRtSys.c +++ b/cmRtSys.c @@ -1146,7 +1146,24 @@ cmRtRC_t cmRtSysDeliverSegMsg( cmRtSysH_t h, const void* msgDataPtrArray[], un } */ - return _cmRtEnqueueMsg(p,p->ssArray[rtSubIdx].htdQueueH,msgDataPtrArray,msgByteCntArray,msgSegCnt,"Host-to-DSP"); + // if rtSubIdx == kInvalidIdx then send the msg to all sub-systems + // otherwise send it to the specified sub-system. + + unsigned i = 0; + unsigned n = 1; + + if( rtSubIdx == cmInvalidIdx ) + n = p->ssCnt; + + for(; issArray[j].htdQueueH,msgDataPtrArray,msgByteCntArray,msgSegCnt,"Host-to-DSP")) != kOkRtRC ) + break; + } + + return rc; } cmRtRC_t cmRtSysDeliverMsg( cmRtSysH_t h, const void* msgPtr, unsigned msgByteCnt, unsigned srcNetNodeId )