From 10c65daad7fae6d2e710590890fe2ea11eb90d5a Mon Sep 17 00:00:00 2001 From: Albert Kharisov Date: Wed, 27 Oct 2021 19:20:08 +0400 Subject: [PATCH] RPC CLI: Change ParallelSafe cli command (#793) Starting RPC session is parallel safe. Launching application command do lock check inside. --- applications/rpc/rpc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/applications/rpc/rpc.c b/applications/rpc/rpc.c index 9f8913d2..b8d6a979 100644 --- a/applications/rpc/rpc.c +++ b/applications/rpc/rpc.c @@ -438,7 +438,7 @@ void rpc_send_and_release(Rpc* rpc, PB_Main* message) { #if DEBUG_PRINT FURI_LOG_I(RPC_TAG, "OUTPUT:"); - rpc_print_message(main_message); + rpc_print_message(message); #endif bool result = pb_encode_ex(&ostream, &PB_Main_msg, message, PB_ENCODE_DELIMITED); @@ -483,7 +483,7 @@ int32_t rpc_srv(void* p) { Cli* cli = furi_record_open("cli"); cli_add_command( - cli, "start_rpc_session", CliCommandFlagDefault, rpc_cli_command_start_session, rpc); + cli, "start_rpc_session", CliCommandFlagParallelSafe, rpc_cli_command_start_session, rpc); while(1) { pb_istream_t istream = {