mirror of
https://github.com/espressif/openthread.git
synced 2026-07-08 21:30:24 +00:00
Fix bugs in retrieving child/router info using an RLOC16. (#475)
This commit is contained in:
+2
-2
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user