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:
Harry Morris
2017-02-15 17:12:43 +00:00
committed by Jonathan Hui
parent 629516244d
commit 0cc27dd91d
+1
View File
@@ -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)