Commit Graph

2828 Commits

Author SHA1 Message Date
Roger A. Light
b6b8039914 Fix use of MOSQ_OPT_TLS_ENGINE being unable to be used.
This was due to the openssl ctx not being initialised until starting to connect.

Closes #2537. Thanks to chessing-c4.
2022-05-17 17:19:17 +01:00
Roger A. Light
127c5e7577 Update changelog 2022-05-11 15:55:05 +01:00
Roger A. Light
45a6b89e91 Merge branch 'abiliojr-fix_msg_modification_leak' into fixes 2022-05-11 15:53:59 +01:00
Roger A. Light
53a9e81480 Merge branch 'fix_msg_modification_leak' of https://github.com/abiliojr/mosquitto into abiliojr-fix_msg_modification_leak 2022-05-11 15:53:48 +01:00
JsBergbau
651331ff7d Added queue_qos0_messages documentation for bridging
See https://github.com/eclipse/mosquitto/pull/2500
2022-05-11 15:51:59 +01:00
Roger Light
82dff0f32d
Merge pull request #2510 from csalve/fix-missing-mutex-for-next_msg_out
fix data race mosquitto_loop function
2022-04-29 22:29:40 +01:00
Roger A. Light
0745a8536a Update changelog.
Fix mosquitto_pub incorrectly reusing topic aliases when reconnecting.

Closes #2494.
2022-04-29 22:20:15 +01:00
Roger Light
d0d8f1a83d
Merge pull request #2513 from Daedaluz/fixes
Don't reuse topic alias after reconnect.
2022-04-29 22:18:52 +01:00
Tobias Assarsson
a9a5ac2283 Don't reuse topic alias after reconnect. 2022-04-20 10:04:58 +02:00
Christian Salvasohn
4077987593 fix data race mosquitto_loop function
next_msg_out must be protected with the msgtime_mutex
as done everywhere else in the code else there is a data race
e.g. if mosquitto_publish is called from another thread

Signed-off-by: Christian Salvasohn <csalvasohn@gmx.de>
2022-04-13 20:05:35 +02:00
Roger Light
3cdeb595ff
Merge pull request #2504 from Hallot/fix/cmake-mosquitto-as-submodule
CMake: Use PROJECT_SOURCE_DIR to improve using mosquitto as subdirectory
2022-04-11 23:50:49 +01:00
Pierre Hallot
8504f6b70b
CMake: Use PROJECT_SOURCE_DIR to improve using mosquitto as subdirectory
When mosquitto is included as subdirectory, `CMAKE_SOURCE_DIR` does not refer to the mosquitto top level CMake file, but to the whole project top level CMake.
Use `PROJECT_SOURCE_DIR` instead to refer to the right CMake in both contextes.

Signed-off-by: Pierre Hallot <hallotpierre@gmail.com>
2022-04-05 16:14:48 +02:00
Abilio Marques
3c48b501e0 broker: fix memory leaks on plugin payload modification
Signed-off-by: Abilio Marques <abiliojr@gmail.com>
2022-03-13 08:48:00 +01:00
Roger A. Light
74814cc68f Simplify cmake threads detection on Windows
Requires cmake 3.1.
2022-02-24 19:04:29 +00:00
Roger A. Light
ffe952f9c7 Merge branch 'podsvirov-win-threads' into fixes 2022-02-24 18:55:48 +00:00
Roger A. Light
49b1d7dfbd Merge branch 'win-threads' of https://github.com/podsvirov/mosquitto into podsvirov-win-threads 2022-02-24 18:55:40 +00:00
Roger A. Light
fc06da2daa Fix pthreads linkage. 2022-02-24 17:01:42 +00:00
Roger A. Light
1e9d00a1a1 Update changelog 2022-02-24 15:56:46 +00:00
Roger Light
fad0b39eaa
Merge pull request #2408 from tjlusco/constant-restart-timeout-fix
Fix constant restart_timeout
2022-02-24 15:55:36 +00:00
Roger A. Light
39f3030643 Fix client_generated flag not being copied on properties.
Closes #2401. Thanks to Diorcet Yann.
2022-02-24 14:05:11 +00:00
Roger A. Light
41b1b0c6d1 Merge branch 'XavierDooms-fix-support-tick-with-per-listener-settings' into fixes 2022-02-24 13:48:41 +00:00
Roger A. Light
62c0d0c9c8 Merge branch 'fix-support-tick-with-per-listener-settings' of https://github.com/XavierDooms/mosquitto into XavierDooms-fix-support-tick-with-per-listener-settings 2022-02-24 13:26: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
Roger A. Light
497cbe0c6c Update changelog 2022-02-24 12:02:16 +00:00
Roger Light
378e96db22
Merge pull request #2430 from abiliojr/fix_invalid_pwd_msg
fix confusing log message on connack error
2022-02-24 11:36:59 +00:00
Roger Light
5aa230dfe6
Merge pull request #2451 from ogayot/python3.10
tests: replace use of ssl.wrap_socket that throws warnings in Python …
2022-02-24 09:39:25 +00:00
Roger Light
0638447c88
Merge pull request #2458 from abiliojr/plugin_rewrite_leak
Fix memory leak when modifying topics using the plugin API
2022-02-24 09:32:48 +00:00
Olivier Gayot
b7fb911428 tests: replace use of ssl.wrap_socket that throws warnings in Python 3.10
The function ssl.wrap_socket() is deprecated starting Python 3.7 because
it does not support hostname matching (which is considered insecure). In
Python 3.10, the function now throws warnings at runtime, which makes
Ubuntu / Debian autopkgtest fail.

The function ssl.SSLContext.wrap_socket comes in as the replacement and
has support for SNI and hostname matching.

Replaced all uses of ssl.wrap_socket() by equivalent using
ssl.SSLContext.wrap_socket().

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-02-15 09:23:06 +01:00
Abilio Marques
5f57de21cd Fix memory leak when modifying topics using the plugin API
Signed-off-by: Abilio Marques <abiliojr@gmail.com>
2022-02-11 21:41:26 +01:00
Abilio Marques
26f747e0ac fix confusing log message on connack error
Signed-off-by: Abilio Marques <abiliojr@gmail.com>
2022-01-11 19:26:25 +01:00
Xavier Dooms
bff71fd99f support plugin tick callbacks with per_listener_settings enabled
add tests for the plugin tick

Signed-off-by: Xavier Dooms <dooms.xavier@gmail.com>
2021-12-27 23:23:58 +01:00
Lusco
366ec5c66e
Update conf.c
The default bridge configuration uses the backoff restart configuration, however this is not cleared if only a constant timeout is desired, causing it to always use the backoff configuration with a 30 second cap.

To trigger this error, use a bridge configuration with a constant timeout (e.g restart_timeout 5). Note that the timeout value is not honoured. 

Clear the backoff configuration when applying restart_timeout.

Signed-off-by: Trevor Luscombe <trevor.luscombe@gmail.com>
2021-12-16 14:14:24 +10:00
Roger A. Light
3cbe805e71 Update docker. 2021-11-17 00:30:52 +00:00
Roger A. Light
fd0e398460 Fix post 2021-11-17 00:28:24 +00:00
Roger A. Light
d743d6e858 Merge branch 'fixes' 2021-11-17 00:27:44 +00:00
Roger A. Light
2a056f14c2 Bump version number, update web. 2021-11-17 00:26:03 +00:00
Roger A. Light
94fcd470d0 Fix incorrect subscribe_callback in mosquittopp.h.
Closes #2367. Thanks to Jens Alfke.
2021-11-17 00:23:04 +00:00
Roger A. Light
9c4f17aa61 Remove broken websockets static compiling option. 2021-11-17 00:02:09 +00:00
Roger A. Light
11975332d4 Fix mosquitto_topic_matches_sub2() not using the length parameters.
Closes #2364. Thanks to Jens Alfke.
2021-11-16 23:14:24 +00:00
Roger A. Light
0d0a36906c Add missing stubs. 2021-11-16 22:14:19 +00:00
Roger A. Light
f3590f3020 Don't pass NULL to printf %s.
This is undefined behaviour, and some platforms don't like it.

Issue #2355. Thanks to CJ Lee.
2021-11-15 22:29:19 +00:00
Roger Light
68504da4a6
Merge pull request #2372 from podsvirov/install-libmosquitto-archive
Set ARCHIVE DESTINATION for mosquitto library
2021-11-15 21:39:03 +00:00
Roger Light
864b77d94a
Merge pull request #2373 from podsvirov/install-libmosquittopp-archive
Set ARCHIVE DESTINATION for mosquittopp library
2021-11-15 21:38:26 +00:00
Roger Light
e52ebf8abf
Merge pull request #2376 from podsvirov/fix-security-module-destination
Fix DESTINATION for mosquitto_dynamic_security MODULE
2021-11-15 21:35:00 +00:00
Roger A. Light
94d61305fa Fix bridge not respecting receive-maximum when reconnecting with MQTT v5. 2021-11-09 13:53:37 +00:00
Konstantin Podsvirov
c4d51f0835 Fix DESTINATION for mosquitto_dynamic_security MODULE
On Windows MODULE will be installed as LIBRARY component
to `lib` folder that is not prefer for dynamic loaded modules
but can be found in RUNTIME DESTINATION (`bin` folder) too.

Signed-off-by: Konstantin Podsvirov <konstantin@podsvirov.pro>
2021-11-06 17:11:09 +03:00
Konstantin Podsvirov
f5fd5cd210 Fix hardcoded pthreads paths on Windows
Use FindThreads module instead if available.

Signed-off-by: Konstantin Podsvirov <konstantin@podsvirov.pro>
2021-11-06 16:58:33 +03:00
Konstantin Podsvirov
b34817cfab Set ARCHIVE DESTINATION for mosquitto library
Signed-off-by: Konstantin Podsvirov <konstantin@podsvirov.pro>
2021-11-06 16:18:04 +03:00
Konstantin Podsvirov
6187143384 Set ARCHIVE DESTINATION for mosquittopp library
Signed-off-by: Konstantin Podsvirov <konstantin@podsvirov.pro>
2021-11-06 16:10:45 +03:00
Roger A. Light
6e6866f0c2 Bump docker versions. 2021-10-28 22:33:08 +01:00