Skip to content
This repository was archived by the owner on Apr 12, 2026. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions tos/lib/net/rpl/RPLOF0P.nc
Original file line number Diff line number Diff line change
Expand Up @@ -134,15 +134,12 @@ implementation{

parentNode = call ParentTable.get(min);

while ((!parentNode->valid) &&
(min < MAX_PARENT) &&
(parentNode->rank != INFINITE_RANK)) {
min++;
while ((min < MAX_PARENT) &&
((!parentNode->valid) || (parentNode->rank == INFINITE_RANK))) {
min++; // skipping invalid entries and nodes with infinite rank
parentNode = call ParentTable.get(min);
}

minDesired = parentNode->etx_hop + (parentNode->rank * divideRank);

if (min == MAX_PARENT) {
call RPLOF.resetRank();
call RPLRoute.inconsistency();
Expand All @@ -151,6 +148,8 @@ implementation{
return FALSE;
}

minDesired = parentNode->etx_hop + (parentNode->rank * divideRank);

// printf("RPLOF: Start Compare %d %d: %d %d %d \n",
// htons(prevParent), htons(parentNode->parentIP.s6_addr16[7]),
// minDesired, parentNode->etx_hop, parentNode->rank);
Expand Down