mirror of
https://github.com/espressif/openthread.git
synced 2026-07-08 13:20:25 +00:00
Gracefully handle invalid linkquality command (#1261)
linkquality cli command always expects at least a extended address specifying the link. If no argument is provided then throw an error and exit.
This commit is contained in:
committed by
Jonathan Hui
parent
629516244d
commit
0cc27dd91d
@@ -1007,6 +1007,7 @@ void Interpreter::ProcessLinkQuality(int argc, char *argv[])
|
||||
uint8_t linkQuality;
|
||||
long value;
|
||||
|
||||
VerifyOrExit(argc > 0, error = kThreadError_InvalidArgs);
|
||||
VerifyOrExit(Hex2Bin(argv[0], extAddress, OT_EXT_ADDRESS_SIZE) >= 0, error = kThreadError_Parse);
|
||||
|
||||
if (argc == 1)
|
||||
|
||||
Reference in New Issue
Block a user