[diag] fix processing platform command (#4099)

This commit is contained in:
Yakun Xu
2019-08-14 22:21:58 -07:00
committed by Jonathan Hui
parent d4bcb16b1d
commit cdc3751e59
2 changed files with 11 additions and 9 deletions
+1 -9
View File
@@ -475,15 +475,7 @@ exit:
{
case OT_ERROR_NONE:
if (argCount >= 1)
{
ProcessCmd(argCount - 1, (argCount == 1) ? NULL : &argVector[1], aOutput, aOutputMaxLen);
}
else
{
ProcessCmd(0, NULL, aOutput, aOutputMaxLen);
}
ProcessCmd(argCount, &argVector[0], aOutput, aOutputMaxLen);
break;
case OT_ERROR_NO_BUFS:
+10
View File
@@ -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)));
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);
// Prepare the response