mirror of
https://github.com/espressif/openthread.git
synced 2026-09-17 14:40:07 +00:00
[diag] fix processing platform command (#4099)
This commit is contained in:
@@ -475,15 +475,7 @@ exit:
|
|||||||
{
|
{
|
||||||
case OT_ERROR_NONE:
|
case OT_ERROR_NONE:
|
||||||
|
|
||||||
if (argCount >= 1)
|
ProcessCmd(argCount, &argVector[0], aOutput, aOutputMaxLen);
|
||||||
{
|
|
||||||
ProcessCmd(argCount - 1, (argCount == 1) ? NULL : &argVector[1], aOutput, aOutputMaxLen);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ProcessCmd(0, NULL, aOutput, aOutputMaxLen);
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case OT_ERROR_NO_BUFS:
|
case OT_ERROR_NO_BUFS:
|
||||||
|
|||||||
@@ -1288,6 +1288,16 @@ otError NcpBase::HandlePropertySet_SPINEL_PROP_NEST_STREAM_MFG(uint8_t aHeader)
|
|||||||
VerifyOrExit(error == OT_ERROR_NONE, error = WriteLastStatusFrame(aHeader, ThreadErrorToSpinelStatus(error)));
|
VerifyOrExit(error == OT_ERROR_NONE, error = WriteLastStatusFrame(aHeader, ThreadErrorToSpinelStatus(error)));
|
||||||
|
|
||||||
output[sizeof(output) - 1] = '\0';
|
output[sizeof(output) - 1] = '\0';
|
||||||
|
|
||||||
|
#if OPENTHREAD_MTD || OPENTHREAD_FTD
|
||||||
|
// TODO do not pass mfg prefix
|
||||||
|
// skip mfg prefix from wpantund
|
||||||
|
if (memcmp(string, "mfg ", 4) == 0)
|
||||||
|
{
|
||||||
|
string += 4;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
otDiagProcessCmdLine(mInstance, string, output, sizeof(output) - 1);
|
otDiagProcessCmdLine(mInstance, string, output, sizeof(output) - 1);
|
||||||
|
|
||||||
// Prepare the response
|
// Prepare the response
|
||||||
|
|||||||
Reference in New Issue
Block a user