Roger A. Light
899135b9af
Fix Coverity Scan 1499805, double free.
2022-10-16 14:46:28 +01:00
Roger A. Light
e16e66b313
Fix missing persist parts
2022-10-11 21:52:21 +01:00
Roger Light
1f559f1a71
Merge pull request #2624 from buschulte/fix-some-compiler-warinngs
...
Add missing callback set calls for MQTTv5 in C++ lib wrapper
2022-10-10 11:22:53 +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
428d39b22b
Ensure restored base msgs are marked as stored.
2022-10-09 22:12:37 +01:00
Roger A. Light
afc575aa1c
Simplify function calls.
2022-09-29 15:08:10 +01:00
Roger A. Light
b11b0b206c
Function naming consistency
2022-09-08 23:49:46 +01:00
Roger A. Light
3102c6ac64
Remove unused member
2022-09-08 23:43:41 +01:00
Roger A. Light
33499efea1
Fix Coverity 1491741 and 1491742.
2022-08-31 15:24:02 +01:00
Roger A. Light
52599ee78b
Fix Coverity 1486951.
2022-08-31 14:34:11 +01:00
Kai Buschulte
ec8566ba0d
Fix conversion warnings
...
Signed-off-by: Kai Buschulte <kai.buschulte@cedalo.com >
2022-08-29 11:23:21 +00:00
Roger A. Light
4997b40259
Report persistence stats when starting.
2022-08-20 22:51:25 +01:00
Roger A. Light
68cfec3cdd
Fix local bridge session expiry interval.
2022-08-18 15:05:14 +01:00
Roger A. Light
3c4d2d0772
Fix persisted clients being restored without a session expiry time.
2022-08-18 14:13:08 +01:00
Roger A. Light
fd68bf00c7
Merge branch 'master' into develop
2022-08-17 16:18:24 +01:00
Roger A. Light
4a6570567a
Merge branch 'x-forwarded-for-lws' of https://github.com/hardillb/mosquitto into hardillb-x-forwarded-for-lws
2022-08-16 14:30:37 +01:00
Ben Hardill
0eec37af99
Add support for X-Forwarded-For LWS
...
I know you've added this for the next release, but here is a fix
for LWS. But just incase there are any more 2.0.x releases.
It does leave the incoming port as 0 but as this is pretty meaningless
for a proxied connection I think it's probably ok.
Signed-off-by: Ben Hardill <hardillb@gmail.com >
2022-08-16 13:54:06 +01:00
Roger A. Light
7917553eb2
Fix expired messages causing queued messages not to be delivered.
...
Closes #2609 . Thanks to JSchy65.
2022-08-16 12:29:18 +01:00
Roger A. Light
cd88906132
Clearer function name
2022-08-16 12:28:13 +01:00
Roger A. Light
fa31b6f41d
Fix bridge queued messages not being persisted.
...
This happens when local_cleansession is set to false and cleansession is
set to true.
Closes #2604 . Thank to Frank Dekervel.
2022-08-13 22:46:19 +01:00
Roger A. Light
775bd2effd
Fix confusing "out of memory" error.
...
This happens when a client is kicked in the dynamic security plugin.
Closes #2525 . Thanks to sezanzeb.
2022-08-12 08:17:17 +01:00
Roger A. Light
531d58e62a
Add X-Forwarded-For support for builtin websockets
2022-08-11 23:05:05 +01:00
Roger A. Light
95e2c4d543
Add support for PUID/PGID environment variables
...
These arefor setting the user/group to drop privileges to.
Closes #2441 . Thanks to matthewparkes.
2022-08-11 14:40:49 +01:00
Roger A. Light
e97d04cbb2
drop_privileges should be file local scope.
2022-08-11 13:53:02 +01:00
Roger A. Light
bf61615075
Merge branch 'cmake-libmosq-public-include' of https://github.com/buschulte/mosquitto into buschulte-cmake-libmosq-public-include
2022-08-11 09:29:21 +01:00
Roger A. Light
351911bd8f
Fix incorrect return code being sent in DISCONNECT.
...
This is for when a client session is taken over.
Closes #2607 . Thanks to der-b
2022-08-10 14:17:22 +01:00
Roger A. Light
08610f7c99
Further fix for #2546 .
2022-08-09 21:25:55 +01:00
Roger A. Light
e5e41c17c2
The persistence interface shouldn't delay retained messages.
...
Let plugins do that if they require it.
2022-08-09 11:27:09 +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
Roger A. Light
a913de2d28
Fix some PUBLISH messages not being counted in $SYS stats.
...
Closes #2448 . Thanks to Antoine.
2022-08-08 00:29:37 +01:00
Roger A. Light
8c0600c40c
Fixed build for openssl compiled with OPENSSL_NO_ENGINE.
...
Closes #2589 . Thanks to Dirk Feytons.
2022-08-06 23:16:55 +01:00
Roger A. Light
a146c218ad
Fix unlimited message quota not being properly checked.
...
This is for incoming messages.
Closes #2593 . Thanks to dongguoqing2015.
2022-08-06 22:49:08 +01:00
Roger A. Light
c170d764fd
Reduce memory allocations in sub and retain trees.
2022-08-05 13:09:19 +01:00
Roger A. Light
2c2c951861
Silence coverity scan on string termination.
2022-07-31 22:58:29 +01:00
Roger A. Light
e70fd299f8
Fix from windows changes
2022-07-24 22:38:24 +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
Roger A. Light
ca61baf5e3
Merge branch 'add-common-options-target-to-enable-compiler-warnings' of https://github.com/buschulte/mosquitto into buschulte-add-common-options-target-to-enable-compiler-warnings
2022-07-21 16:21:29 +01:00
Roger A. Light
11b16756cb
Windows fixes.
2022-07-21 15:51:52 +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
Roger A. Light
4093e717f9
Minor refactor
2022-07-07 13:38:52 +01: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
a883bda9c1
Add CMake test target
...
Use `ctest` or `make test` to run all tests.
With this it's also possible to run tests on a Mac.
Relative paths used in tests become absolute ones to make tests
executable from any build folder.
Also fixed race condition in
test/broker/11-persistent-subscription-no-local.py
Signed-off-by: Kai Buschulte <kai.buschulte@cedalo.com >
2022-06-22 23:56:50 +01:00
Kai Buschulte
8b5a86fd52
Introduce config-header cmake target
...
This is an interface cmake target which specifies include directories
required by the config.h places in the root of the project.
This header is a "public" header visible to plugins linking the
mosquitto exports.
Signed-off-by: Kai Buschulte <kai.buschulte@cedalo.com >
2022-06-22 23:56:09 +01: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
436635fda8
Use absolute rather than relative paths when installing.
2022-06-22 22:43:39 +01:00
Roger A. Light
546df9db85
Build fixes, particularly pedantic compiler warnings.
2022-06-14 22:29:05 +01:00
Roger A. Light
29f49bf6ab
Publish global out_packet values to $SYS
2022-06-04 22:40:48 +01:00
Roger A. Light
4099f8d1b6
Store out_packet bytes rather than having to calculate it.
2022-06-02 23:02:17 +01:00
Roger A. Light
c99502a256
Add clients to session expiry check list when restarting and reloading from persistence.
...
Closes #2546 . Thanks to Joachim Schachermayer.
2022-05-23 23:05:49 +01:00
Roger A. Light
80b36919b1
Fix incorrect pointer use.
2022-05-23 22:38:02 +01:00