mirror of
https://github.com/espressif/openthread.git
synced 2026-07-08 13:20:25 +00:00
return the right error information for some cli commands (#1644)
This commit is contained in:
+4
-4
@@ -457,7 +457,7 @@ void Interpreter::ProcessChannel(int argc, char *argv[])
|
||||
else
|
||||
{
|
||||
SuccessOrExit(error = ParseLong(argv[0], value));
|
||||
otLinkSetChannel(mInstance, static_cast<uint8_t>(value));
|
||||
error = otLinkSetChannel(mInstance, static_cast<uint8_t>(value));
|
||||
}
|
||||
|
||||
exit:
|
||||
@@ -900,7 +900,7 @@ void Interpreter::ProcessExtAddress(int argc, char *argv[])
|
||||
|
||||
VerifyOrExit(Hex2Bin(argv[0], extAddress.m8, sizeof(otExtAddress)) >= 0, error = kThreadError_Parse);
|
||||
|
||||
otLinkSetExtendedAddress(mInstance, &extAddress);
|
||||
error = otLinkSetExtendedAddress(mInstance, &extAddress);
|
||||
}
|
||||
|
||||
exit:
|
||||
@@ -932,7 +932,7 @@ void Interpreter::ProcessExtPanId(int argc, char *argv[])
|
||||
|
||||
VerifyOrExit(Hex2Bin(argv[0], extPanId, sizeof(extPanId)) >= 0, error = kThreadError_Parse);
|
||||
|
||||
otThreadSetExtendedPanId(mInstance, extPanId);
|
||||
error = otThreadSetExtendedPanId(mInstance, extPanId);
|
||||
}
|
||||
|
||||
exit:
|
||||
@@ -1437,7 +1437,7 @@ void Interpreter::ProcessPanId(int argc, char *argv[])
|
||||
else
|
||||
{
|
||||
SuccessOrExit(error = ParseLong(argv[0], value));
|
||||
otLinkSetPanId(mInstance, static_cast<otPanId>(value));
|
||||
error = otLinkSetPanId(mInstance, static_cast<otPanId>(value));
|
||||
}
|
||||
|
||||
exit:
|
||||
|
||||
Reference in New Issue
Block a user