When receiving ComId 107 the funciton ttiStoreTrnNetDir is reading the trnNetDir from the wrong address (4 bytes before the actual data starts).
Current code:
/ 4 Bytes up to cstCnt plus number of Consists /
size = appHandle->pTTDB->trnNetDir.entryCnt * sizeof(TRDP_TRAIN_NET_DIR_ENTRY_T);
memcpy(&appHandle->pTTDB->trnNetDir.trnNetDir[0], pData, size);
pData += 4 + size; / jump to etbTopoCnt /
Expected code:
/ 4 Bytes up to cstCnt plus number of Consists /
size = appHandle->pTTDB->trnNetDir.entryCnt * sizeof(TRDP_TRAIN_NET_DIR_ENTRY_T);
pData += 4; / jump to trnNetDir /
memcpy(&appHandle->pTTDB->trnNetDir.trnNetDir[0], pData, size);
pData += size; / jump to etbTopoCnt /
Implemented accordingly. To be tested.
Tested in api_test_4.c test3