Commit graph

139 commits

Author SHA1 Message Date
Roger A. Light
1e0a07ba5a Add missing int to string conversions. 2022-12-01 11:35:48 +00:00
Roger A. Light
b49631df23 Add mosquitto_passwd tests 2022-11-30 13:46:35 +00:00
Roger A. Light
9cc5d1d6ff Add mosquitto_ctrl tests 2022-11-30 13:46:10 +00:00
Roger A. Light
89cca44c17 Refactor to remove duplicate code. 2022-11-30 13:43:13 +00:00
Roger A. Light
86f3a6b484 Extend db_dump tests, and fix minor bugs. 2022-11-30 13:42:49 +00:00
Roger A. Light
d767aa488c Remove unnecessary padding. 2022-11-30 09:51:33 +00:00
Roger A. Light
26de915f53 Use MAKE macro, no need to pass MAKEFLAGS. 2022-11-16 20:05:10 +00:00
Roger A. Light
88b20c9113 Fix missing make targets 2022-11-15 16:44:44 +00:00
Roger A. Light
67d0792fd6 Remove duplicate code. 2022-11-15 15:50:25 +00:00
Roger A. Light
27c99bc7e7 Add db_dump test to verify current broker output. 2022-11-11 11:47:54 +00:00
Roger A. Light
6b1b0bf7bc Start of db_dump tests. 2022-11-10 23:27:47 +00:00
Roger A. Light
afc575aa1c Simplify function calls. 2022-09-29 15:08:10 +01:00
Roger A. Light
4997b40259 Report persistence stats when starting. 2022-08-20 22:51:25 +01:00
Roger A. Light
ca618c6f96 Fix db_dump coverage build 2022-08-18 23:54:47 +01:00
Roger A. Light
fd68bf00c7 Merge branch 'master' into develop 2022-08-17 16:18:24 +01:00
Roger A. Light
f9fa19ce6a - Fix -o not working in mosquitto_ctrl, and typo in related documentation.
Closes #2471. Thanks to Vitaljok and rillbert
2022-08-10 15:14:32 +01:00
Kai Buschulte
ddd16d54be Make required includes public for libmosquitto
for simplified usage of the CMake target

Issue number: #2452

Signed-off-by: Kai Buschulte <kai.buschulte@cedalo.com>
2022-08-08 12:24:15 +02: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
Roger A. Light
d71451984c Fix frees in db_dump. 2022-08-01 23:52:29 +01:00
Roger A. Light
c397d080b4 Merge branch 'fix-corrupted-dynsec-config' of https://github.com/NorbertHeusser/mosquitto into NorbertHeusser-fix-corrupted-dynsec-config 2022-07-21 20:18:38 +01:00
Norbert Heusser
621d74fd6a Created new helper function mosquitto_write_file in common/misc_mosq.h to consolidate
saving config files in failsafe manner

Signed-off-by: Norbert Heusser <norbert.heusser@cedalo.com>
2022-07-19 17:22:19 +00:00
Kai Buschulte
71456077ad Introduce a common-options cmake target
this makes it possible to explicitly share compile options, without
using the `add_definition` function. This function declares options for
the current directory and below (in our case also for `deps`).

Adding -Wall, -Wconversion and -Wextra to at least make compiler
warnings visible for the cmake build.

Signed-off-by: Kai Buschulte <kai.buschulte@cedalo.com>
2022-07-04 11:16:01 +02:00
Kai Buschulte
36935a3384 Use OpenSSL:SSL cmake target
Instead of using the CMAKE_OPENSSL_INCLUDE and CMAKE_OPENSSL_LIBRARY
variables the imported target OpenSSL::SSL is used.
This is a more modern way of target linking.

Signed-off-by: Kai Buschulte <kai.buschulte@cedalo.com>
2022-06-22 23:56:09 +01:00
Roger A. Light
e3246f547c Print messages in mosquitto_passwd when adding/updating passwords.
Closes #2544. Thanks to Shruti Nanda.
2022-05-25 17:15:04 +01:00
Roger A. Light
3e1cf8a80b Fix tests build. 2022-05-25 16:16:48 +01:00
Kai Buschulte
0e9df05d0d Add imported target for cJSON
Signed-off-by: Kai Buschulte <kai.buschulte@cedalo.com>
2022-05-11 07:01:17 +00:00
Norbert Heusser
d4216c8cb6 Fixed CMakeLists.txt
* Addded missing files plugin_subscribe and plugin_unsubscribe to src/CMakeLists.txt
* Aligned mixed usage of all-keyword and all-plain in target_link_libra…ry definition in in CMakeLists.txt

Signed-off-by: Norbert Heusser <norbert.heusser@cedalo.com>
2022-04-06 10:26:03 +00:00
Roger A. Light
b922c13509 Compile broker against pthreads if threading enabled.
This allows plugins to *carefully* use threads.
2022-04-01 13:48:26 +01:00
Roger A. Light
dbe1554cf5 Fix Coverity Scan 1486946 Resource leak. 2022-03-24 08:11:11 +00:00
Roger A. Light
726b7f42a8 Fix Coverity Scan 1486941 2022-03-24 08:11:11 +00:00
Roger A. Light
2d3b152a22 Rename of mosquitto_msg_store struct.
struct mosquitto_msg_store -> struct mosquitto_base_msg

This is the base message which client messages and retained messages
refer to. The base messages are still held in the message store.

This change comes about because the persistence interface exposes these
message types. Prior to this commit the different messages were "msg",
"client_msg", and "retain". After this commit there is "base_msg",
"client_msg", and and "retain_msg" in the persist interface.
2022-03-01 10:44:47 +00:00
Roger A. Light
14d1c32f9d Update changelog. Style, whitespace and, linker fixes. 2022-02-24 15:52:06 +00:00
Roger A. Light
96931643a4 Use strings.h for strcasecmp, except on Windows.
Closes #2420. Thanks to Frédéric Fauberteau.
2022-02-24 12:02:16 +00:00
Norbert Heusser
e7e8b6e832 * Added list of connections to dynsec/getClient response
* Added new helper function mosquitto_apply_on_all_clients to broker
* Refactoring in dynamic-security plugin

Signed-off-by: Norbert Heusser <norbert.heusser@cedalo.com>
2022-02-21 16:27:26 +00:00
Roger A. Light
ffb7661d86 Move shared code to common directory
This is currently limited to "utility" type functions and does not include code common to the library and broker that are protocol related.
2022-02-09 16:26:10 +00:00
Roger A. Light
5a3b42d4a4 Use path vars in Makefiles. 2022-02-09 14:44:09 +00:00
Roger A. Light
6b32cf61b2 CMake build fixes, including sqlite support. 2022-02-04 14:53:19 +00:00
Roger A. Light
8d073771c3 Make some plugin code shared for future use. 2022-02-03 23:08:28 +00:00
Roger A. Light
9b2c64135f listPlugins command, and test. 2022-01-20 22:24:12 +00:00
Roger A. Light
82658805c7 listListeners command. 2022-01-20 15:00:21 +00:00
Roger A. Light
0f8733627a Plugin persistence interface. 2021-11-24 19:26:07 +00:00
Roger A. Light
9ad8d943be Stored messages now always stored in a hash table. 2021-11-11 11:20:30 +00:00
Roger Light
cd07f1136b Bump copyrights. 2021-11-03 22:10:06 +00:00
Roger A. Light
8ac11929cc Merge branch 'master' into develop 2021-10-27 17:19:33 +01:00
Roger A. Light
799cdead15 Experimental custom websockets support. 2021-10-06 15:32:45 +01:00
Roger A. Light
be80a3f4d0 Fix client id not showing in log on failed connections, where possible. 2021-10-06 10:09:38 +01:00
Roger A. Light
a1a190b482 Pointless whitespace tidy. 2021-10-05 15:20:37 +01:00
Roger A. Light
55d5d2e5f2 Fix for building when uthash not available. 2021-09-30 21:37:11 +01:00
Roger Light
dbd0d6f0d8 CMake build fixes. 2021-09-28 11:48:03 +01:00
Roger A. Light
a73806acd4 App build fix. 2021-09-23 15:04:11 +01:00