78 Commits

Author SHA1 Message Date
Christian W. Zuckschwerdt
e6cb4cbf80 minor: Update symbolizer output 2026-07-18 19:19:49 +02:00
Christian W. Zuckschwerdt
cd1394f483 minor: Fix regex typo in symbolizer 2026-07-18 14:03:32 +02:00
Christian W. Zuckschwerdt
d17901b796 Add output file reopen on sighup (#3282) 2026-07-16 17:55:25 +02:00
Christian W. Zuckschwerdt
e04b0978da docs: Change to mark variable data keys in symbolizer 2026-07-15 22:07:54 +02:00
Christian W. Zuckschwerdt
64eb9d90c5 minor: Fix warnings for C23 generic functions
For ISO C23, the functions bsearch, memchr, strchr, strpbrk, strrchr, strstr, wcschr, wcspbrk, wcsrchr, wcsstr and wmemchr that return pointers into their input arrays now have definitions as macros that return a pointer to a const-qualified type when the input argument is a pointer to a const-qualified type.
2026-07-15 16:13:43 +02:00
Dan Dwyer
0daaa39bff build: Add memory leak detection in "Build Analyze Check" GitHub Action
issue: 3350
2026-07-02 22:43:00 +02:00
Andrew Berry
ec1245ca16 test: Add abuf data corruption regression tests
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 13:43:12 +02:00
Andrew Berry
5e20bd2c40 Fix http server truncating large get_stats/get_protocols JSON
The /cmd getters serialized into fixed stack buffers (get_stats 20480,
get_meta 2048, get_protocols 102400). When a report exceeded its buffer
the output was silently corrupted into invalid JSON, not cleanly
truncated: the abuf string builder drops an oversized chunk but keeps
appending the smaller chunks that follow, so e.g. a get_stats reply with
~230 enabled decoders ended like `...,"name":,:8256}`. Clients then fail
to parse the response and the corresponding data never updates.

Make the serializer report truncation and add data_print_jsons_dup(),
which grows a heap buffer until the whole document fits, and use it for
the three JSON-payload getters:

- abuf gains an `overflow` flag, set by abuf_cat/abuf_printf and the
  hand-rolled string formatter whenever a write is dropped or truncated.
- data_print_jsons_dup() retries with a doubled buffer until no overflow
  (64 MiB sanity cap), so the report is never truncated.
- get_stats/get_meta/get_protocols use it and free the buffer after
  responding; out-of-memory yields an error reply instead of a partial one.

Tests:
- data-test asserts a large report serializes to a complete object via
  data_print_jsons_dup() while a fixed undersized buffer does not.
- the HTTP integration test now validates that get_protocols/get_stats/
  get_meta return parseable JSON, not just HTTP 200.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 13:43:12 +02:00
Andrew Berry
7a04dbdec9 test: Add HTTP/WS server test coverage
Add black-box integration tests for the HTTP/WS server and rtl_tcp,
plus a gcov coverage helper and supporting CI wiring.

Refs: #3541

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 13:43:12 +02:00
Christian W. Zuckschwerdt
3aa399b45a minor: Cleanup docs 2026-02-25 13:04:28 +01:00
Christian W. Zuckschwerdt
c0036e055c minor: Fix time compat for Win32 2026-02-17 10:48:46 +01:00
Kevin Mehall
a6ae3d3ea1 Add timestamp parsing to OOK input file parser (#3464) 2026-02-16 19:58:59 +01:00
Christian W. Zuckschwerdt
5bb50779c9 minor: Clean up data_make, add data output to symbolizer 2026-02-13 17:52:38 +01:00
Christian W. Zuckschwerdt
0265721620 Add demod state reset between input files (#3310) 2025-06-26 12:52:32 +02:00
Christian W. Zuckschwerdt
5ff470d229 Refactor to type-safe data_append alternative (#2667) 2024-06-06 13:10:03 +02:00
Christian W. Zuckschwerdt
115cf6eb21 minor: Cleanup m_bus data_append, enable dead stores check 2024-03-12 20:49:28 +01:00
Christian W. Zuckschwerdt
2a1bfda929 minor: Rename util to bit_util 2024-03-06 20:10:15 +01:00
Christian W. Zuckschwerdt
55d5385c88 minor: Fix more unexpected chars in input files 2024-02-07 19:34:39 +01:00
MDW
9ab47d9e1a minor: Fix shell script as shellcheck suggests (#2743) 2023-11-30 09:19:03 +01:00
MDW
62783813eb minor: Fix trailing whitespace as seen in #2738 (#2739) 2023-11-29 20:57:32 +01:00
Christian W. Zuckschwerdt
96226b5a77 minor: Add GCC Static analysis (closes #1372) 2023-10-21 19:55:41 +02:00
obones
ecb0b361ad Change r_device.fields to constant pointer (#2421)
Allows for static "output_fields" to be stored in readonly memory on embedded architectures.
2023-03-13 16:01:29 +01:00
obones
371ccfd54f Add char const check to symbolizer (#2390)
make sure that char* declarations with a direct assignment of a constant are no longer valid in plugins. They must be char const * because string literals are "const" with newest compilers
2023-02-20 15:11:29 +01:00
obones
cc6f4521d2 Change all r_device declarations to const (#2352)
Change all r_device declarations to const, which places them in the "read only" memory portion which is distinct from the limited quantity SRAM available on embedded platforms.
2023-01-31 12:32:17 +01:00
Christian W. Zuckschwerdt
0ff7247336 Add output log level options (#2282) 2022-12-19 18:44:29 +01:00
Christian W. Zuckschwerdt
81f846ff5d Change fprintf to log prints (#2266) 2022-12-04 12:13:29 +01:00
Christian W. Zuckschwerdt
1aa49c04f5 Fix deprecated function prototypes 2022-11-14 17:46:17 +01:00
Christian W. Zuckschwerdt
15637a2f2d minor: Fix various decoder doc comments 2022-09-01 15:45:09 +02:00
Christian W. Zuckschwerdt
9ed2518448 minor: Fix symbolizer file/line location 2022-09-01 01:13:06 +02:00
Christian W. Zuckschwerdt
eda74c17db minor: Add visibility to dynamic lib exports (closes #2010)
Co-authored-by: "Rick Farina (Zero_Chaos)" <zerochaos@gentoo.org>
2022-03-18 08:15:48 +01:00
Christian W. Zuckschwerdt
9843a3411d Fix irregular model names BREAKING CHANGE (#1883)
- "Inkbird ITH-20R" -> "Inkbird-ITH20R"
- "LaCrosse-WS7000-27/28" -> "LaCrosse-WS700027"
- "LaCrosse-WS7000-22/25" -> "LaCrosse-WS700022"
- "LaCrosse-WS7000-16" -> "LaCrosse-WS700016"
- "LaCrosse-WS7000-15" -> "LaCrosse-WS700015"
- "LaCrosse-WS7000-20" -> "LaCrosse-WS700020"
- "LaCrosse-WS2500-19" -> "LaCrosse-WS250019"
- "Abarth 124 Spider" -> "Abarth-124Spider"
- "Jansite Solar" -> "Jansite-Solar"
- "Klimalogg Pro" -> "Klimalogg-Pro"
- "Secplus_v1" -> "Secplus-v1"
- "SCM+" -> "SCMplus"
2022-01-08 12:10:14 +01:00
Christian W. Zuckschwerdt
305edc44f9 Refactor file outputs from data 2021-12-08 12:00:42 +01:00
Christian W. Zuckschwerdt
6c8af75c75 minor: Fix stricter compiler warnings 2021-11-13 13:55:49 +01:00
Christian W. Zuckschwerdt
4bb75b4cd2 build: Add symbolizer check 2021-10-29 14:20:32 +02:00
Christian W. Zuckschwerdt
04a66623d2 minor: fix float literals 2021-05-08 16:49:47 +02:00
Christian W. Zuckschwerdt
2eda6ac964 Add variable fm low pass filter option 2021-02-05 17:01:18 +01:00
Christian W. Zuckschwerdt
cfc9777d22 Add jsmn json lib 2020-11-10 15:22:58 +01:00
Christian W. Zuckschwerdt
8212b334a8 Add style check action 2020-09-18 19:45:27 +02:00
Rick van Schijndel
e571a05240 test: Fix memory/file pointer leaks in tests 2020-04-18 10:25:04 +02:00
Rick van Schijndel
6ebad62cdc cosmetics: Remove or comment out unused variables and code 2020-03-09 23:04:53 +01:00
Christian W. Zuckschwerdt
f5e5a6aed4 Add pulse-eval example 2020-02-18 10:22:17 +01:00
Gisle Vanem
8cd8155829 Minor fix style warning (#1304) 2020-02-08 13:14:09 +01:00
Christian W. Zuckschwerdt
739e856a92 Cleanup style minor 2019-11-08 22:51:55 +01:00
Christian W. Zuckschwerdt
f637a2f590 Make clang analyzer warnings to errors 2019-11-08 13:20:21 +01:00
Christian W. Zuckschwerdt
70c506e6b9 Add optional CSA checker to tests
To run full tests with the static analyzer:
cmake -DBUILD_TESTING_ANALYZER=1 -DCMAKE_BUILD_TYPE=Debug .. && make CTEST_OUTPUT_ON_FAILURE=1 all test
2019-11-03 11:57:07 +01:00
Benjamin Larsson
5105b13c68 fsk: add Y option for selecting different fsk low pass coefficients
Prepatory work for new fsk pulse detector
2019-11-03 01:25:38 +03:00
Christian W. Zuckschwerdt
ca440974c9 Fix some warnings from static analysis (#1183) 2019-10-29 13:02:43 +01:00
Christian W. Zuckschwerdt
de8f73b0ed Add warnings on alloc failure, enforce alloc check style 2019-10-17 08:41:14 +02:00
Christian W. Zuckschwerdt
b863bf1298 Clean up stdout+printf in devices; add style check 2019-08-21 11:16:53 +02:00
Christian W. Zuckschwerdt
567efee6a3 Force all indent to spaces 2019-08-20 11:22:12 +02:00