Don't return parent info if the device is not a child (#1868)

* Fix the issue that the previous parent information could be retrieved
  even after the device is not a child

* Print more parent information in CLI
This commit is contained in:
Shu Chen
2017-06-03 00:03:48 +08:00
committed by Jonathan Hui
parent 0cbb0898e1
commit 4460fb1815
2 changed files with 6 additions and 0 deletions
+3
View File
@@ -1534,6 +1534,9 @@ void Interpreter::ProcessParent(int argc, char *argv[])
mServer->OutputFormat("\r\n");
mServer->OutputFormat("Rloc: %x\r\n", parentInfo.mRloc16);
mServer->OutputFormat("Link Quality In: %d\r\n", parentInfo.mLinkQualityIn);
mServer->OutputFormat("Link Quality Out: %d\r\n", parentInfo.mLinkQualityOut);
mServer->OutputFormat("Age: %d\r\n", parentInfo.mAge);
exit:
(void)argc;