Skip to content

Commit b55423f

Browse files
Damian-Nordicrlubos
authored andcommitted
samples: protocols_serialization: client: fix "ot thread"
Fix argument parsing for "ot thread" shell command to be able to properly stop thread. Signed-off-by: Damian Krolik <[email protected]>
1 parent d26ecdd commit b55423f

File tree

1 file changed

+2
-2
lines changed
  • samples/nrf_rpc/protocols_serialization/client/src

1 file changed

+2
-2
lines changed

samples/nrf_rpc/protocols_serialization/client/src/ot_shell.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -330,11 +330,11 @@ static otError ot_cli_command_state(const struct shell *sh, size_t argc, char *a
330330

331331
static otError ot_cli_command_thread(const struct shell *sh, size_t argc, char *argv[])
332332
{
333-
if (strcmp(argv[2], "start")) {
333+
if (strcmp(argv[1], "start") == 0) {
334334
return otThreadSetEnabled(NULL, true);
335335
}
336336

337-
if (strcmp(argv[2], "stop")) {
337+
if (strcmp(argv[1], "stop") == 0) {
338338
return otThreadSetEnabled(NULL, false);
339339
}
340340

0 commit comments

Comments
 (0)