Roger A. Light
49ebb58569
Fix failure to close thread in some situations.
...
Closes #2545 . Thanks to p-luke.
3 years ago
Roger A. Light
02b92b97ef
Fix use of MOSQ_OPT_SSL_CTX when used with MOSQ_OPT_SSL_CTX_DEFAULTS
...
Closes #2463 . Thanks to Tim Nordell.
3 years ago
Roger A. Light
6468bb4f9b
Fix documentation omission around mosquitto_reinitialise.
...
Closes #2489 . Thanks to rroguski
3 years ago
Roger A. Light
e979a46c04
Backport SSL connect fixes.
...
Closes #2594 .
Closes #2595 .
3 years ago
Roger A. Light
a913de2d28
Fix some PUBLISH messages not being counted in $SYS stats.
...
Closes #2448 . Thanks to Antoine.
3 years ago
Roger A. Light
0c9d9f2163
Don't set SIGPIPE to ignore, use MSG_NOSIGNAL instead.
...
Closes #2564 . Thanks to nmeum.
3 years ago
Roger A. Light
2e061afcc6
Fix build
3 years ago
Roger A. Light
ebfebf8708
Fix bridges not sending failure notification messages.
...
This is for messages to the local broker if the remote bridge connection
fails.
Closes #1488 .
Closes #2467 .
3 years ago
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.
3 years ago
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>
4 years ago
Roger A. Light
39f3030643
Fix client_generated flag not being copied on properties.
...
Closes #2401 . Thanks to Diorcet Yann.
4 years ago
Roger A. Light
96931643a4
Use strings.h for strcasecmp, except on Windows.
...
Closes #2420 . Thanks to Frédéric Fauberteau.
4 years ago
Roger A. Light
94fcd470d0
Fix incorrect subscribe_callback in mosquittopp.h.
...
Closes #2367 . Thanks to Jens Alfke.
4 years ago
Roger A. Light
11975332d4
Fix mosquitto_topic_matches_sub2() not using the length parameters.
...
Closes #2364 . Thanks to Jens Alfke.
4 years ago
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.
4 years ago
Roger Light
68504da4a6
Merge pull request #2372 from podsvirov/install-libmosquitto-archive
...
Set ARCHIVE DESTINATION for mosquitto library
4 years ago
Konstantin Podsvirov
b34817cfab
Set ARCHIVE DESTINATION for mosquitto library
...
Signed-off-by: Konstantin Podsvirov <konstantin@podsvirov.pro>
4 years ago
Konstantin Podsvirov
6187143384
Set ARCHIVE DESTINATION for mosquittopp library
...
Signed-off-by: Konstantin Podsvirov <konstantin@podsvirov.pro>
4 years ago
Roger A. Light
7b614b3b59
Move to end of file on append, when on Windows.
4 years ago
Roger A. Light
be80a3f4d0
Fix client id not showing in log on failed connections, where possible.
4 years ago
Roger A. Light
a1a190b482
Pointless whitespace tidy.
4 years ago
Roger A. Light
0ce167c472
Fix log file being truncated on Windows.
4 years ago
Roger Light
3f62e80300
Merge pull request #2317 from doragasu/fixes_discon_cb_on_tls_err
...
Call disconnect callback on TLS error.
4 years ago
Roger A. Light
9e28eea0a2
Initialise sockpairR/W to invalid in `mosquitto_reinitialise()`
...
This avoids closing invalid sockets in `mosquitto_destroy()` on error.
Closes #2326 . Thanks to Arrigo Zanette.
4 years ago
Roger A. Light
330bf6efdc
Various fixes around inflight quota management.
...
Closes #2306 . Thanks to canique.
4 years ago
doragasu
4471ee9e47
Call disconnect callback on TLS error.
...
When using the library asynchronously, TLS errors caused e.g. because
of the date/time not set correctly, cause the connection to be silently
dropped without the disconnection callback being invoked, as described
in issue #1052 .
This commit fixes the issue, returning the behavior to the one the
library had previous to version 1.5.4, if a TLS error occurs, the
disconnect callback will be invoked for the client to get notified of
the error.
Signed-off-by: doragasu <doragasu@protonmail.com>
4 years ago
Roger A. Light
d09591d92e
Fix reconnecting in some cases when using MOSQ_OPT_TLS_USE_OS_CERTS.
...
Fix reconnecting failing when MOSQ_OPT_TLS_USE_OS_CERTS was in use, but none
of capath, cafile, psk, nor MOSQ_OPT_SSL_CTX were set, and
MOSQ_OPT_SSL_CTX_WITH_DEFAULTS was set to the default value of true.
Closes #2288 . Thanks to Poltorak Serguei.
4 years ago
Roger A. Light
605131502b
Fix MOSQ_OPT_SSL_CTX not being able to be set to NULL.
...
Closes #2289 . Thanks to Poltorak Serguei.
4 years ago
Roger A. Light
9d6a73f9f7
Fix CONNECT performance with many user-properties.
...
An MQTT v5 client connecting with a large number of user-property properties
could cause excessive CPU usage, leading to a loss of performance and
possible denial of service. This has been fixed.
4 years ago
Roger Light
32af599c81
Fix $share subscriptions not being recovered for durable clients.
...
If a plugin had granted ACL subscription access to a
durable/non-clean-session client, then removed that access, the client would
keep its existing subscription. This has been fixed.
4 years ago
Roger A. Light
376226c129
Build warning fixes.
4 years ago
Roger A. Light
9b25dd3b0d
libressl build fixes.
...
Closes #2198 . Thanks to Theo Buehler.
4 years ago
Roger A. Light
0d1837ebe3
Deconfigure thread mode when the loop thread ends.
...
Threaded mode is deconfigured when the mosquitto_loop_start() thread ends,
which allows mosquitto_loop_start() to be called again.
Closes #2242 . Thanks to Timo Lange.
4 years ago
Roger A. Light
9526b4cf23
Check for file==dir only when reading.
4 years ago
Roger Light
ba2ca33671
Strict protocol compliance fixes, and extensive test suite.
4 years ago
Roger Light
723b5d7081
Fix listener mount_point not being removed on outgoing messages.
...
Closes #2244 . Thanks to alflexRH.
4 years ago
Roger Light
6608e852a1
Fix broker not quiting if `password_file` is specified as a directory.
...
Closes #2241 . Thanks to Bryan Pearson.
4 years ago
Roger Light
93b2232bb9
Apply max_keepalive to MQTT v3.1.1 and v3.1 clients.
4 years ago
Roger A. Light
ea371564e7
Disable TLS 1.3 when using TLS-PSK, because it isn't correctly config'd.
4 years ago
Roger A. Light
a37c8e65d2
TLS-PSK mismatch fix.
...
Produce an error if a TLS-PSK client tries to connect to a broker
that is not configured with TLS-PSK.
4 years ago
Roger A. Light
79542158f4
Fix `max_connections` option not being correctly counted.
4 years ago
Roger A. Light
4e146b7b53
Fix possible out of bounds memory reads when reading configuration.
...
This would happen with a corrupt/crafted configuration file. Unless your
configuration file is writable by untrusted users this is not a risk.
Closes #567213 . Thanks to Roland Sako.
4 years ago
Roger A. Light
8416f928df
Revert premature want_connect fix.
4 years ago
Roger A. Light
403691ce40
Add missing return types.
4 years ago
Roger A. Light
104b94db57
Fix non-reachable bridge blocking the broker on Windows.
...
Closes #2172 . Thanks to Niclas Lindgren.
4 years ago
Roger A. Light
625e2a5060
Refactor to remove duplicate code.
4 years ago
Roger A. Light
16fb0025a7
Improve QoS 0 outgoing packet queueing.
4 years ago
Roger Light
9bb58a88fc
Cleanup messsage before return.
...
Coverity scan #1451483 .
4 years ago
Roger A. Light
a2ab20df13
Don't call read() if sockpairR < 0.
...
Coverity #1450782 .
4 years ago
Roger Light
b4c86df6f5
Fix missing control path.
...
Closes #2190 . Thanks to RengeRenge.
4 years ago