Fix bugs in retrieving child/router info using an RLOC16. (#475)

This commit is contained in:
Jonathan Hui
2016-08-25 21:09:01 -07:00
committed by GitHub
parent 767df0f437
commit 70bd6af3b8
+2 -2
View File
@@ -334,7 +334,7 @@ void Interpreter::ProcessChild(int argc, char *argv[])
}
SuccessOrExit(error = ParseLong(argv[0], value));
SuccessOrExit(error = otGetChildInfoById(static_cast<uint8_t>(value), &childInfo));
SuccessOrExit(error = otGetChildInfoById(static_cast<uint16_t>(value), &childInfo));
sServer->OutputFormat("Child ID: %d\r\n", childInfo.mChildId);
sServer->OutputFormat("Rloc: %04x\r\n", childInfo.mRloc16);
@@ -1550,7 +1550,7 @@ void Interpreter::ProcessRouter(int argc, char *argv[])
}
SuccessOrExit(error = ParseLong(argv[0], value));
SuccessOrExit(error = otGetRouterInfo(static_cast<uint8_t>(value), &routerInfo));
SuccessOrExit(error = otGetRouterInfo(static_cast<uint16_t>(value), &routerInfo));
sServer->OutputFormat("Alloc: %d\r\n", routerInfo.mAllocated);