When checking a cashed DNS entry it is accepted as valid if ether cashed
etbTopoCnt == appHandle->etbTopoCnt
or
opTrnTopoCnt == appHandle->opTrnTopoCnt
is true.
My expectation is that if any is changed the cashed DNS entry is invalid.
In tau_uri2Addr
Old sources:
if ((pTemp != NULL) &&
((pTemp->fixedEntry == TRUE) ||
(pTemp->etbTopoCnt == appHandle->etbTopoCnt) || / Do the topocounts match? /
(pTemp->opTrnTopoCnt == appHandle->opTrnTopoCnt) ||
((appHandle->etbTopoCnt == 0u) && (appHandle->opTrnTopoCnt == 0u))) && / Or do we not care? /
(pTemp->ipAddr != 0)) / 0 is only a placeholder /
Expected:
if ((pTemp != NULL) &&
((pTemp->fixedEntry == TRUE) ||
((pTemp->etbTopoCnt == appHandle->etbTopoCnt) && / Do the topocounts match? /
(pTemp->opTrnTopoCnt == appHandle->opTrnTopoCnt) ) ||
((appHandle->etbTopoCnt == 0u) && (appHandle->opTrnTopoCnt == 0u))) && / Or do we not care? /
(pTemp->ipAddr != 0)) /* 0 is only a placeholder *
Changed accordingly. To be tested.
Tested in api_test_4.c test2