Commit graph

79 commits

Author SHA1 Message Date
Roger A. Light
460995652e Formatting: Apply to C headers 2025-09-17 12:48:02 +01:00
Roger A. Light
7ea73f6d60 Formatting: Forbid single line if statements
These hide cases from coverage checks
2025-09-17 12:48:02 +01:00
Roger A. Light
883fdb2ad2 Formatting: Double indent continuation 2025-09-17 12:03:06 +01:00
Roger A. Light
6e7ddef145 Formatting: Always include comma for last enum
Plus some spacing
2025-09-17 12:03:06 +01:00
Roger A. Light
9d95bf24c3 Formatting: Indent fixes 2025-09-17 12:03:06 +01:00
Roger A. Light
d743413ac3 Formatting: Spacing consistency 2025-09-17 12:03:06 +01:00
Roger A. Light
67ad22df0a Formatting: Double space before functions. 2025-09-17 12:03:03 +01:00
Roger A. Light
c64273f663 Fix build on Mac OS, introduce Mac OS CI workflow
Closes #3312
2025-08-14 08:38:45 +01:00
Norbert Heusser
7a22685866 Fixed memory issue with property handling in persistence SQLite will restore
Signed-off-by: Norbert Heusser <norbert.heusser@cedalo.com>
2025-08-04 18:36:24 +01:00
Steve Hamann
2077283a30 Add script to migrate from Snapshot persistence to SQLite persistence
Signed-off-by: Steve Hamann <steve.hamann@cedalo.com>
2025-08-04 18:31:02 +01:00
Roger A. Light
0c0683094b Allow plugins to choose when their tick event is next called 2025-07-10 21:06:01 +01:00
Norbert Heusser
424df70395 Add support for will message to persistence API and Sqlite3 persistence plugin
Signed-off-by: Norbert Heusser <norbert.heusser@cedalo.com>
2025-07-10 00:52:33 +01:00
Roger A. Light
3511db6889 Whitespace tidy
Some checks failed
CodeQL / Analyze (cpp) (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled
Coverage / coverage (push) Has been cancelled
Mosquitto - CMake / build (push) Has been cancelled
Mosquitto - Make ASAN / build (push) Has been cancelled
Mosquitto - Make / build (push) Has been cancelled
Windows build / mosquitto (push) Has been cancelled
2025-04-06 22:40:48 +01:00
Roger A. Light
f8d37b70a6 Merge branch 'fix-persist-plugin-expiry' of github.com:NorbertHeusser/mosquitto into NorbertHeusser-fix-persist-plugin-expiry 2025-02-26 09:59:32 +00:00
Roger A. Light
2f32fcd949 Move properties_to_json to libmosquitto_common 2024-06-18 17:54:02 +01:00
Roger A. Light
db6ab6869a Fix mismatched alloc/frees 2024-04-25 16:20:14 +01:00
Norbert Heusser
b8564daa20 Fixed deletion of expired session after restore from persistence plugin
Signed-off-by: Norbert Heusser <norbert.heusser@cedalo.com>
2024-03-12 07:54:18 +00:00
Roger A. Light
340c4f323f Rename cmake helper functions. 2024-03-05 09:36:15 +00:00
Roger A. Light
f39ecb3d27 Factor out a load of duplicated makefile code 2024-03-02 10:35:45 +00:00
Norbert Heusser
3656b991d5 Refactoring persist-sqlite plugin and moved functionality from
handle_connect.c into database.c

Signed-off-by: Norbert Heusser <norbert.heusser@cedalo.com>
2024-02-15 22:43:28 +00:00
Norbert Heusser
d68dd563db Persist-SQLite: Add new table version_info and addition wal_checkpoint on shutdown
Signed-off-by: Norbert Heusser <norbert.heusser@cedalo.com>
2024-02-15 22:43:28 +00:00
Roger A. Light
fe3b72ef61 Remove a load of cmake boilerplate 2024-02-15 13:39:11 +00:00
Roger A. Light
d17a88d916 Refactor headers for easier discovery. 2023-12-23 12:59:58 +00:00
Roger A. Light
c8e313aac0 Fix build
This is for the case where command line overrides are set.
2023-09-19 22:48:24 +01:00
Roger A. Light
e656e694ed Merge branch 'master' into develop 2023-09-09 15:20:40 +01:00
Roger A. Light
3bb4ff180e Fix Coverity Scan 1509020 Unchecked return value.
This was really a false positive, however the intent is probably clearer
now.
2023-07-09 08:40:02 +01:00
Roger A. Light
a31bee722f Simplify make build. 2023-05-10 16:20:06 +01:00
Roger Light
2b69724ef2 Fix cmake build 2023-04-21 22:38:18 +01:00
Roger A. Light
747fcacd67 Make args const where possible, fix persist-sqlite build. 2023-04-19 22:54:53 +01:00
Roger A. Light
56462c1229 Refactor for more consistent json helper use. 2023-04-19 17:12:20 +01:00
Roger A. Light
da0eab36a4 Remove unused events 2023-01-16 22:49:31 +00:00
Roger A. Light
fd330de080 client_id -> clientid rename. 2023-01-16 18:46:35 +00:00
Roger A. Light
3e17494d34 Rename topic -> topic_filter in events. 2023-01-16 17:17:55 +00:00
Roger A. Light
1081661f74 Refactor client structs. 2023-01-16 10:21:12 +00:00
Roger A. Light
5364410615 Rename members 2023-01-16 10:21:12 +00:00
Roger A. Light
7013a3502d Refactor client_msg structs 2023-01-16 10:21:12 +00:00
Roger A. Light
3634f18bc9 Refactor subscription structs 2023-01-16 10:21:12 +00:00
Roger A. Light
100fd31530 Refactor base_msg structs. 2023-01-16 10:21:12 +00:00
Norbert Heusser
170cd85cec Add target test-compile to all Makefile to allow tests in plugin folders
Signed-off-by: Norbert Heusser <norbert.heusser@cedalo.com>
2022-12-09 18:03:54 +00:00
Roger A. Light
403f6443be Sqlite: Provide logs on restore errors 2022-10-16 21:23:15 +01:00
Roger A. Light
9bb389dda1 Avoid compile error.
"a label can only be part of a statement and a declaration is not a
statement"
2022-10-16 08:13:46 +01:00
Roger A. Light
1a5cd9e849 Fix Coverity Scan 1499794. 2022-10-16 07:39:50 +01:00
Roger A. Light
a872c0466f Fix leak 2022-10-13 20:41:01 +01:00
Roger A. Light
adf985bff8 Persistence: Store cmsg_id and sub id for client_msgs. 2022-10-11 21:51:43 +01:00
Roger A. Light
cfd4aa1c95 sqlite: Consistent naming 2022-10-11 21:50:03 +01:00
Roger A. Light
2bfb0dc022 sqlite: client_msgs are only ever all cleared 2022-10-11 21:49:33 +01:00
Roger A. Light
bdf8493e81 sqlite: base_msg can never have these properties 2022-10-11 21:48:51 +01:00
Roger A. Light
16feb14a57 Persistence interface updates and sqlite plugin fixes
The MOSQ_EVT_PERSIST_CLIENT_MSG_CLEAR event has been removed, due to
never being called. It is the responsibility of the plugin to remove
client subscriptions and client messages when the client is removed.

Lots of persist test improvements and additions - mostly checking item
counts.
2022-10-09 22:17:47 +01:00
Roger A. Light
d4960d0ead sqlite: Save/restore binary properties. 2022-10-09 22:02:59 +01:00
Kai Buschulte
8b67883548 Remove old compatibility header support
Signed-off-by: Kai Buschulte <kai.buschulte@cedalo.com>
2022-08-08 09:25:16 +00:00