mirror of
https://github.com/espressif/openthread.git
synced 2026-07-23 04:24:06 +00:00
[cli] fix argument parsing for counters command (#5004)
This fixes the argument parsing for counters command. The lines calling otLinkResetCounters and otThreadResetMleCounters are unreachable and this fixes it.
This commit is contained in:
+2
-2
@@ -1136,7 +1136,7 @@ void Interpreter::ProcessCounters(uint8_t aArgsLength, char *aArgs[])
|
||||
mServer->OutputFormat(" RxErrFcs: %d\r\n", macCounters->mRxErrFcs);
|
||||
mServer->OutputFormat(" RxErrOther: %d\r\n", macCounters->mRxErrOther);
|
||||
}
|
||||
else if ((aArgsLength == 2) && (strcmp(aArgs[0], "reset") == 0))
|
||||
else if ((aArgsLength == 2) && (strcmp(aArgs[1], "reset") == 0))
|
||||
{
|
||||
otLinkResetCounters(mInstance);
|
||||
}
|
||||
@@ -1162,7 +1162,7 @@ void Interpreter::ProcessCounters(uint8_t aArgsLength, char *aArgs[])
|
||||
mleCounters->mBetterPartitionAttachAttempts);
|
||||
mServer->OutputFormat("Parent Changes: %d\r\n", mleCounters->mParentChanges);
|
||||
}
|
||||
else if ((aArgsLength == 2) && (strcmp(aArgs[0], "reset") == 0))
|
||||
else if ((aArgsLength == 2) && (strcmp(aArgs[1], "reset") == 0))
|
||||
{
|
||||
otThreadResetMleCounters(mInstance);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user