mirror of
https://github.com/espressif/openthread.git
synced 2026-07-11 06:40:19 +00:00
Automatic Joiners removal in Commissioner (#1421)
* Implement automatic Joiner removal feature. * Save some RAM in JoinerRouter class. * Specify timeout for each Joiner separately. * Update Windows API files.
This commit is contained in:
committed by
Jonathan Hui
parent
6eaacdd4a4
commit
746a40a340
+9
-1
@@ -2327,7 +2327,15 @@ void Interpreter::ProcessCommissioner(int argc, char *argv[])
|
||||
if (strcmp(argv[1], "add") == 0)
|
||||
{
|
||||
VerifyOrExit(argc > 3, error = kThreadError_Parse);
|
||||
SuccessOrExit(error = otCommissionerAddJoiner(mInstance, addrPtr, argv[3]));
|
||||
// Timeout parameter is optional - if not specified, use default value.
|
||||
unsigned long timeout = kDefaultJoinerTimeout;
|
||||
|
||||
if (argc > 4)
|
||||
{
|
||||
SuccessOrExit(error = ParseUnsignedLong(argv[4], timeout));
|
||||
}
|
||||
|
||||
SuccessOrExit(error = otCommissionerAddJoiner(mInstance, addrPtr, argv[3], static_cast<uint32_t>(timeout)));
|
||||
}
|
||||
else if (strcmp(argv[1], "remove") == 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user