|
@@ -29,7 +29,7 @@ typedef enum
|
29
|
29
|
kDisableCbCmdId
|
30
|
30
|
} kRtCmdId_t;
|
31
|
31
|
|
32
|
|
-cmRtSysH_t cmRtSysNullHandle = { NULL };
|
|
32
|
+cmRtSysH_t cmRtSysNullHandle = cmSTATIC_NULL_HANDLE;
|
33
|
33
|
|
34
|
34
|
struct cmRt_str;
|
35
|
35
|
|
|
@@ -961,7 +961,7 @@ cmRtRC_t cmRtSysCfg( cmRtSysH_t h, const cmRtSysSubSys_t* ss, unsigned rtSubIdx
|
961
|
961
|
for(j=0; j<ss->endptCnt; ++j)
|
962
|
962
|
{
|
963
|
963
|
cmRtSysNetEndpt_t* ep = ss->endptArray + j;
|
964
|
|
- if( cmRtNetRegisterEndPoint( cp->netH, ep->label, ep->id ) != kOkNetRC )
|
|
964
|
+ if( cmRtNetRegisterEndPoint( cp->netH, cp->ctx.rtSubIdx, ep->label, ep->id ) != kOkNetRC )
|
965
|
965
|
{
|
966
|
966
|
rc = _cmRtError(p,kNetErrRtRC,"Network end point allocation failed on label:%s id:%i.",cmStringNullGuard(ep->label),ep->id);
|
967
|
967
|
goto errLabel;
|
|
@@ -1280,6 +1280,23 @@ cmRtRC_t cmRtSysNetReport( cmRtSysH_t h )
|
1280
|
1280
|
|
1281
|
1281
|
}
|
1282
|
1282
|
|
|
1283
|
+cmRtRC_t cmRtSysNetGetHandle( cmRtSysH_t h, unsigned rtSubIdx, cmRtNetH_t* hp )
|
|
1284
|
+{
|
|
1285
|
+ cmRtRC_t rc = kOkRtRC;
|
|
1286
|
+ cmRt_t* p = _cmRtHandleToPtr(h);
|
|
1287
|
+
|
|
1288
|
+ assert( rtSubIdx < p->ssCnt );
|
|
1289
|
+
|
|
1290
|
+ if( rtSubIdx < p->ssCnt )
|
|
1291
|
+ {
|
|
1292
|
+ *hp = p->ssArray[rtSubIdx].netH;
|
|
1293
|
+ return rc;
|
|
1294
|
+ }
|
|
1295
|
+
|
|
1296
|
+ return cmErrMsg(&p->err,kInvalidArgRtRC,"The rtSubIdx %i is out of range %i.",rtSubIdx,p->ssCnt);
|
|
1297
|
+}
|
|
1298
|
+
|
|
1299
|
+
|
1283
|
1300
|
|
1284
|
1301
|
//===========================================================================================================================
|
1285
|
1302
|
//
|