Skip to content

Commit 42630e9

Browse files
committed
CLI: Fix missing cleanup for subghz chat on region restricted
frequencies
1 parent 9540147 commit 42630e9

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@
192192
- Fix slashes in prefilled filename (by @WillyJL)
193193
- Handle PPS request in ISO14443-4 layer (by @WillyJL)
194194
- FBT: Fix redundant decl for apps using an icon disabled in API (by @WillyJL)
195+
- CLI: Fix missing cleanup for subghz chat on region restricted frequencies (by @WillyJL)
195196
- UL: Sub-GHz: Fix crash in add manually menu (by @xMasterX)
196197
- Clangd: Add clangd parameters in IDE agnostic config file (by @WillyJL)
197198
- OFW: GUI: Fix Number Input Save Icon (by @zinongli)

applications/main/subghz/subghz_cli.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -941,6 +941,13 @@ static void subghz_cli_command_chat(PipeSide* pipe, FuriString* args) {
941941
return;
942942
}
943943
}
944+
if(!furi_hal_region_is_frequency_allowed(frequency)) {
945+
printf(
946+
"In your settings/region, only reception on this frequency (%lu) is allowed,\r\n"
947+
"the actual operation of the application is not possible\r\n ",
948+
frequency);
949+
return;
950+
}
944951
subghz_devices_init();
945952
const SubGhzDevice* device = subghz_cli_command_get_device(&device_ind);
946953
if(!subghz_devices_is_frequency_valid(device, frequency)) {
@@ -950,13 +957,6 @@ static void subghz_cli_command_chat(PipeSide* pipe, FuriString* args) {
950957
subghz_cli_radio_device_power_off();
951958
return;
952959
}
953-
if(!furi_hal_region_is_frequency_allowed(frequency)) {
954-
printf(
955-
"In your settings/region, only reception on this frequency (%lu) is allowed,\r\n"
956-
"the actual operation of the application is not possible\r\n ",
957-
frequency);
958-
return;
959-
}
960960

961961
SubGhzChatWorker* subghz_chat = subghz_chat_worker_alloc(pipe);
962962

0 commit comments

Comments
 (0)