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
9a97a5afc4
Improve client protocol version number logging.
...
Protocol version numbers reported in the log when a client connects now
match the MQTT protocol version numbers, not internal Mosquitto values.
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 Light
cad11de873
Merge pull request #2249 from cdelston0/develop-transitive-topics
...
Swap bridge topic storage from array to linked-list
4 years ago
Roger A. Light
49065f03a8
Merge remote-tracking branch 'origin/fixes' into develop
4 years ago
Chris Elston
aa5233fc85
Swap bridge topic array to linked list
...
Bridge topics are added on startup to an allocated array which is
reallocated with each new topic. This change alters bridge topic
storage to use a singly linked list.
This is to facilitate upcoming changes to support bridge topic
add/remove operations.
4 years ago
Roger A. Light
a02aad0a9c
Add mosquitto_sub_matches_acl_with_pattern.
4 years ago
Roger A. Light
f90e55bd36
Reduce memory allocations when sending packets.
4 years ago
Roger A. Light
e0309acebc
Add mosquitto_sub_matches_acl()
...
This moves the sub matching sub code from the dynsec plugin to the library and broker, and removes all of the malloc calls at the same time.
4 years ago
Roger A. Light
b3045d1adf
Fix pattern matching with invalid prefix.
4 years ago
Roger A. Light
6502d6e5f4
Add mosquitto_topic_matches_sub_with_pattern()
...
And use it in the default security checks.
4 years ago
Roger A. Light
dfd5dc5b92
Remove unused struct member.
4 years ago
Roger A. Light
e0bcf8cda4
Simplify SSL accept/connect.
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
906a515704
Simplify client message properties, only one is used.
4 years ago
Roger Light
f934230251
Simplify out packet mutex use.
4 years ago
Roger A. Light
214feb8f6b
Merge branch 'fixes' into develop
4 years ago
Roger A. Light
0d3870585b
Plugin delayed authentication.
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 Light
9c9ca33d63
Fix two potential leaks.
4 years ago
Roger Light
0a90e62f93
CMake tidy.
4 years ago
Roger Light
931c590a37
Merge pull request #2156 from abiliojr/improve_tls
...
add cipher settings for bridge, and support for TLS 1.3 ciphers
4 years ago
Roger A. Light
a2ab20df13
Don't call read() if sockpairR < 0.
...
Coverity #1450782 .
4 years ago
Roger A. Light
b7b3a42e75
Strict build fixes.
4 years ago
Roger A. Light
8a03b5ad5c
Function for checking if a context is connected.
4 years ago
Roger Light
b4c86df6f5
Fix missing control path.
...
Closes #2190 . Thanks to RengeRenge.
4 years ago
Roger Light
e1c8f09372
Remove C++ style comments.
4 years ago
Roger Light
ef7662ca8e
Merge branch 'master' into develop
4 years ago
Christian Beier
fe10226cc9
Fix building with Visual Studio 2008
...
This older Microsoft compiler does not support mixing declarations and
code and misses some error defines. This commit enables building with
VS2008 by moving up some variable declarations and defining error
codes to their WinSock counterparts in case they're not defined.
Signed-off-by: Christian Beier <info@christianbeier.net>
5 years ago
Roger Light
6ebbb4d654
Fix possible socket leak.
...
This would occur if a client was using `mosquitto_loop_start()`, then if
the connection failed due to the remote server being inaccessible they
called `mosquitto_loop_stop(, true)` and recreated the mosquitto object.
See: https://www.eclipse.org/forums/index.php?t=rview&goto=1839865#msg_1839865
5 years ago
Abilio Marques
c637a192a3
add support for tlsv1.3 ciphers
...
Signed-off-by: Abilio Marques <abiliojr@gmail.com>
5 years ago
Roger A. Light
3cc6630d64
alias_mosq.c must be part of the cmake lib build.
5 years ago
Roger A. Light
de9780343b
Add support for MQTT v5 broker->client topic aliases.
...
This is on a first-come-first-served basis for now.
Also broker to bridge topic aliases.
5 years ago
Roger Light
0f9e5795a2
Merge pull request #2145 from abiliojr/empty_sockpairR
...
Fully empty sockpairR on interruptible_sleep
5 years ago
Abilio Marques
dd4a64b049
fully empty socketpairR on interruptible_sleep
...
Signed-off-by: Abilio Marques <abiliojr@gmail.com>
5 years ago
Abilio Marques
91f34e084f
fix duplication of messages during connect
...
Signed-off-by: Abilio Marques <abiliojr@gmail.com>
5 years ago
Roger Light
2de8c15bc9
Minor build fixes.
5 years ago
Roger Light
cca41d176d
Fix inconsistent sign in log__printf declaration.
5 years ago
Roger Light
898da756ed
Remove unused message timestamp member.
5 years ago
Roger Light
dd890ff0ee
Add missing header.
5 years ago
Roger Light
1e94e08843
Callbacks no longer block other callbacks.
...
The can also be set from within a callback.
Closes #2127 . Thanks to Weston Schmidt.
5 years ago
Roger A. Light
f8838243fb
Fix connections retrying very rapidly in some situations.
...
Thanks to Abilio Marques.
5 years ago
Roger A. Light
b7a08d5c40
Fix TLS bridge/lib incorrectly connecting on invalid CA file.
...
Closes #2130 . Thanks to becz.
5 years ago
Roger A. Light
fd036b9435
Merge branch 'fixes' into develop
5 years ago
Roger A. Light
abc288a435
Experimental kqueue support.
5 years ago
Roger A. Light
e401def06d
Fix QoS 0 messages not being delivered when max_queued_bytes was configured.
...
Closes #2123 . Thanks to quackgizmo.
5 years ago
Roger A. Light
2190e98b20
Fix memory tracking not being available on FreeBSD or macOS.
...
Closes #2096 . Thanks to blusewang.
5 years ago
Roger A. Light
3f84ad006d
Add `on_pre_connect()` callback.
...
This allows clients to update usernames/passwords/TLS parameters prior
to reconnecting.
5 years ago
Roger A. Light
9b08faf0bd
Fix mosquitto_{pub|sub}_topic_check() function returns.
...
The would not return MOSQ_ERR_INVAL on topic == NULL.
5 years ago
Roger A. Light
e98cc28cd3
Move check after current_out_packet is updated.
5 years ago
Przemek Zygmunt
18bad1ff32
Unconditionally adding an event to the epoll causes 100% CPU usage. This happens when the connection to the server is established and the client has not sent any data yet.
...
Signed-off-by: Przemek Zygmunt <p.zygmunt@acsoftware.pl>
5 years ago
Roger A. Light
6e3738dcf0
Fix bridges not always connecting on Windows.
...
Closes #2043 . Thanks to ttsorensen.
5 years ago
Roger A. Light
706a1f3f29
Fix more minor compiler warnings.
5 years ago
Roger A. Light
a4389fc9ce
Fix SPDX identifiers: EDL-1.0 -> BSD-3-Clause.
...
The two licenses are the same.
5 years ago
Roger A. Light
c9aa3ca847
Add MOSQ_OPT_DISABLE_SOCKETPAIR.
5 years ago
Roger A. Light
370cec5edd
Fixes for lots of minor build warnings highlighted by Visual Studio.
5 years ago
Roger A. Light
fabdfcc060
Further fix for large packets not being sent in a timely fashion.
5 years ago
Roger Light
c604cf8fd0
net__write buf should be const.
5 years ago
Roger A. Light
b2da540c64
Fix large packets not being completely published to slow clients.
...
Also fix bridge connection not relinquishing POLLOUT after messages are
sent.
Closes #1977 . Thanks to marchaesen.
Closes #1979 . Thanks to GorazdKikelj.
5 years ago
Roger A. Light
2db9aecac4
Do not reset bind address option if passed NULL.
...
mosquitto_connect_bind_async() and mosquitto_connect_bind_v5() should not
reset the bind address option if called with bind_address == NULL.
Otherwise calling mosquitto_connect_async() will *force* the bind
address to be reset, even if previously set with
mosquitto_string_option().
5 years ago
Roger A. Light
e02b5a2775
Fix $SYS/broker/publish/messages/+ counters not being updated for QoS 1, 2
...
Closes #1968 . Thanks to promahn.
5 years ago
Roger A. Light
757902bcf8
Improve struct packing.
5 years ago
Roger A. Light
d8dcfd75fe
lib: Fix DH group not being set for TLS connections.
...
This meant ciphers using DHE couldn't be used.
Closes #1925 . Closes #1476 . Thanks to Jonathan Sönnerup, Valerii
Demeshko, and sectokia.
5 years ago
Nikolay Raspopov
71845d28ac
Fixed some VS2017 compilation error and warnings ( #1916 )
...
* Fixed some VS2017 compilation errors and warnings.
Signed-off-by: raspopov <raspopov@cherubicsoft.com>
5 years ago
Roger A. Light
828e7ae130
More conversion fixes.
5 years ago
Roger A. Light
df1802d8f1
Fix client state conversion warnings.
5 years ago
Roger A. Light
232a759320
Log client port on new connections.
...
Closes #1911 . Thanks to twegener-embertec.
5 years ago
Roger A. Light
3731535298
Add SPDX license identifiers.
5 years ago
Roger A. Light
04c110183c
Bridge support for MQTT v5 maximum-qos.
5 years ago
Roger A. Light
e030ca45cd
Fix connack error printing.
5 years ago
Roger A. Light
0c22f475ff
Fix bridges incorrectly setting Wills to manage remote notifications.
...
This is for when `notifications_local_only` was set true.
Closes #1902 . Thanks to marcinkowskip.
5 years ago
Roger A. Light
b34dcd2a67
Final remove support for legacy libwebsockets
...
This means libwebsockets < 2.4.0.
5 years ago
Roger A. Light
29c771cdd4
Add lib and client support for OS CA certs
...
- Add `MOSQ_OPT_TLS_USE_OS_CERTS` option, to instruct the client to load and trust OS provided CA certificates for use with TLS connections.
- All clients now load OS provided CA certificates if used with `-L
mqtts://...`, or if port is set to 8883 and no other CA certificates are
used. Closes #1824 .
- Add the `--tls-use-os-certs` option to all clients.
Closes #1824 . Thanks to Jens Reimann.
5 years ago
Roger A. Light
a3258f7d82
Packet cleanup without locks
...
Prevents use of invalid mutexes during mosquitto_destroy.
Closes #1914 . Thanks to Nikolay Raspopov.
5 years ago
Roger A. Light
584cf51ba7
Update to EPL-2.0
5 years ago
Roger A. Light
dac841a342
Better outgoing QoS 0 limiting.
5 years ago
Roger A. Light
2755fe3c4c
Apply limits to QoS 0 outgoing messages.
5 years ago
Roger A. Light
4da1f15b41
Fix Coverity Scan errors.
...
1436854
1436844
5 years ago
Roger A. Light
d26534e22b
Fix Coverity scan issues.
...
1302840
1353078
1431131
1431134
1431135
1436826
1436827
1436828
1436830
1436831
1436834
1436835
1436838
1436839
1436840
1436844
1436846
1436853
1436854
1436859
1436860
1436861
1436863
1436867
5 years ago
Roger A. Light
4e3b8ed2b5
Fix cherry picked commit.
5 years ago
Roger A. Light
10ecae6275
Fix bridge sock not being removed from sock hash on error
...
Prior to this, duplicate entries could be added to the sock hash, which caused an infinite loop. Only affects bridges with bad settings on startup, and only when compiled using WITH_ADNS=yes.
Closes #1897 . Thanks to Rodolfo Ochoa.
5 years ago
Franz Auernigg
18a6d79ab8
Fix cmake if condition in lib/CMakeLists.txt
...
Signed-off-by: Franz Auernigg <f.auernigg@commend.com>
5 years ago
Roger A. Light
b816d46508
Use db as a global var instead of passing to functions.
...
This allows a big swath of ifdefs to be removed. It also means savings as the db var is not passed around all of the time, and makes it easier to remove the final broker call to mosquitto_time() call in packet_mosq.c. In one test this reduced the calls to mosquitto_time() from 295k to 48k.
5 years ago
Roger A. Light
108b23ce6d
Reduce use of mosquitto_time() and time().
5 years ago
Roger A. Light
c2651cf005
Remove deprecation warning on libmosquittopp.
5 years ago
Roger A. Light
23d3c2641e
Optimise epoll event to context/listener mapping. Allows quicker lookups.
5 years ago
Roger A. Light
4d6384c758
Build and conversion fixes for build variants.
5 years ago
Roger A. Light
8e7e4a9d9a
Clients: Give warning if keepalive too low.
5 years ago
Arenoros
9c3a214a01
In android ndk doesn't exist librt and libpthread
...
Signed-off-by: Arenoros <arenoros@gmail.com>
5 years ago
raspopov
add355a78b
QNX has no pselect() either.
...
Signed-off-by: raspopov <raspopov@cherubicsoft.com>
5 years ago
Roger A. Light
2e72d795a9
Fix timeout conversion error.
5 years ago
raspopov
0097a85ce0
Something bad happened with a "timeout" parameter of mosquitto_loop() function in 4f61f6c161
. Reverted.
...
Signed-off-by: raspopov <raspopov@cherubicsoft.com>
5 years ago
Roger A. Light
abbeb4494f
Change `tls_version` option behaviour.
...
The `tls_version` option now defines the *minimum* TLS protocol version to
be used, rather than the exact version.
Closes #1258 . Thanks to Daniele Sluijters.
5 years ago
Roger A. Light
88b5daee66
Try very hard not to produce "Socket error" message.
...
This happens when an unhandled error occurs on a socket/read write. The
message is confusing to people.
5 years ago
Roger A. Light
e82ee879d5
Merge branch 'fixes' into develop
5 years ago
raspopov
53d63fe922
Fixed compilation error on Win32 UNICODE platform.
...
Signed-off-by: raspopov <raspopov@cherubicsoft.com>
5 years ago
raspopov
6af56610ac
Fixed "config.h" file placement to help using it as a precompiled header.
...
Signed-off-by: raspopov <raspopov@cherubicsoft.com>
5 years ago
Roger A. Light
7ae7d73fd4
The loop in packet_write() means that `max_packets` isn't needed.
5 years ago
CJ Lee
988b5cf0b2
Add missing header for QNX
...
<arpa/inet.h> header is required to compile this source. Without it, WARNING is generated.
mosquitto/lib/socks_mosq.c: In function 'socks5__send':
mosquitto/lib/socks_mosq.c:156:22: warning: implicit declaration of function 'inet_pton' [-Wimplicit-function-declaration]
ipv4_pton_result = inet_pton(AF_INET, mosq->host, &addr_ipv4);
Signed-off-by: ChangJoon Lee <changjoon.lee@lge.com>
5 years ago
Roger A. Light
4f61f6c161
Fix conversion errors.
5 years ago
Roger A. Light
6104172bcf
Fix connect properties not being sent.
...
This was happening when the client automatically reconnected.
Closes #1846 . Thanks to DSOFreak.
5 years ago
Roger A. Light
9724710cd6
Add MOSQ_OPT_BIND_ADDRESS.
...
This allows setting of a bind address independently of the
`mosquitto_connect*()` call.
5 years ago
Roger A. Light
89733138bb
CMake build fixes.
5 years ago
Roger A. Light
a65f946e83
Move headers to own directory.
5 years ago
Roger A. Light
c90e49af1b
Merge remote-tracking branch 'origin/fixes' into develop
5 years ago
Roger A. Light
2774515456
Fix missing mach/mach_time.h header on OS X.
...
Closes #1831 . Thanks to P-Hagen.
5 years ago
Roger A. Light
acf4ff3738
Fix stdin being closed by mistake
...
This was closing the sockpair* sockets before they were initialised to INVALID_SOCKET.
Close #1823 . Thanks to ostkamp.
5 years ago
Roger A. Light
a53712a14d
Don't use logging until log mutex is initialised.
...
Closes #1819 . Thanks to santoshks68.
5 years ago
Roger A. Light
298d84941e
Fix send quota being incorrecly reset on reconnect.
...
Closes #1822 . Thanks to Sarek.
5 years ago
Roger A. Light
56ba1b99db
Add `mosquitto_ssl_get()`.
...
This allow clients to access their SSL structure and
perform additional verification.
5 years ago
Roger A. Light
5daa5ee162
Add support for $CONTROL/ topics in plugins.
5 years ago
Roger A. Light
f0862e26ec
Add `mosquitto_kick_client_by_clientid()` and `mosquitto_kick_client_by_username()`
...
These can be used by plugins to disconnect clients.
5 years ago
Roger A. Light
bb5456729d
Move keepalive check code to separate file.
...
This is in preparation for changing to a tree based implementation.
5 years ago
ignacy.ruksza
3806296c15
Ld symbol of the mosquitto_property_copy_all has global bind now.
...
Signed-off-by: ignacy.ruksza <ignacy.ruksza@ledatel.pl>
5 years ago
Roger A. Light
39ff7226eb
Bump version, add new www posts.
5 years ago
Titouan Christophe
79051fbdca
do not include pthread when compiling without threading support
...
This fixes the following error, when compiling for systems without
pthread support, and when passing WITH_THREADING=no to make:
thread_mosq.c:24:12: fatal error: pthread.h: No such file or directory
# include <pthread.h>
^~~~~~~~~~~
compilation terminated.
Signed-off-by: Titouan Christophe <titouan.christophe@railnova.eu>
5 years ago
Karl Palsson
2fdb5a0171
docs: move _string_option with rest of client options
...
It was grouped with the callbacks, where it didn't make a lot of sense.
Signed-off-by: Karl Palsson <karlp@tweak.net.au>
5 years ago
Karl Palsson
d254ea70df
docs: remove duplicate mosquitto_reconnect_delay_set
...
Was listed in both client options, and under the callbacks.
Signed-off-by: Karl Palsson <karlp@tweak.net.au>
5 years ago
Roger A. Light
c9218fd48c
Bump version.
5 years ago
Roger A. Light
b3c2ac20dc
Fix overly broad HAVE_PTHREAD_CANCEL compile guard.
...
Closes #1547 . Thanks to Markus Gothe.
5 years ago
Roger A. Light
4b100df5b1
Fix reconnect+will delay interval issue causing missing messages.
...
Fix clients not receiving messages after a previous client with the same client ID and positive will delay interval quit.
Closes #1752 . Thanks to Jiří Zuzaňák.
5 years ago
Roger Light
4ef48269f5
Fix mosquitto_loop_stop() not stopping on Windows
...
Closes #1748 . Closes #117 . Thanks to Sigmund Vik.
5 years ago
Roger A. Light
bd27935ff6
`mosquitto_loop_start()` now sets a thread name.
...
This applies on Linux, FreeBSD, NetBSD, and OpenBSD.
Closes #1777 . Thanks to ABuch19.
5 years ago
Roger A. Light
f180e923ef
Merge branch 'lazy_ssl' of git://github.com/abiliojr/mosquitto into abiliojr-lazy_ssl
5 years ago
Roger A. Light
9b5112f547
Fix unsigned compared against 0.
...
Coverity Scan 1431132.
5 years ago
Roger A. Light
1b060bb064
Guard against use-after-free.
...
Coverity Scan 1431131, 1431135, 1431141.
5 years ago
Roger A. Light
84e4ba2c1e
Send DISCONNECT with malformed-packet reason code on bad PUBLISHes.
5 years ago
Abilio Marques
d5aae3eca7
lazy init SSL
...
Signed-off-by: Abilio Marques <abiliojr@gmail.com>
5 years ago
Roger A. Light
d371b3c58b
Fix `mosquitto_publish*()` no longer returning `MOSQ_ERR_NO_CONN`.
...
This was always returning success when the client was not connected.
Closes #1725 . Thanks to BOTorioN.
5 years ago
Roger A. Light
d9003bb858
Don't use mutex until it is initialised.
...
Coverity Scan 1430456.
5 years ago
Roger A. Light
e3e8dc4ea4
Allow send__pub{ack,rec,rel,comp} to send properties.
5 years ago
Roger A. Light
c8964228e3
Improved documentation around connect callback return codes.
...
Close #1730 . Thanks to John Laird.
5 years ago
Jasper Lievisse Adriaanse
4ef7ea6244
extend ifdef guard to fix compilation on OpenBSD
...
otherwise in6_addr, AF_INET and AF_INET6 end up being undefined
Signed-off-by: Jasper Lievisse Adriaanse <jasper@humppa.nl>
5 years ago
Roger A. Light
a9c97efaa4
Document that keepalive must be >= 5 seconds.
5 years ago
Roger A. Light
cea0423e69
Update changelog and version.
5 years ago
Martin Kelly
8d54aaef89
add a refcount to library init/cleanup
...
Add a refcount around mosquitto_lib_init and mosquitto_lib_cleanup so
that multiple calls to init/cleanup don't trigger memory leaks or
double-frees.
Signed-off-by: Martin Kelly <mkelly@xevo.com>
5 years ago
Martin Kelly
d103174b5c
correct mosquitto.h return code documentation
...
We currently erroneously claim that mosquitto_lib_init cannot fail,
while it can fail on Windows, if WSAStartup fails in net__init. Correct
this.
Signed-off-by: Martin Kelly <mkelly@xevo.com>
5 years ago
Martin Kelly
61a50c60d2
add a refcount to library init/cleanup
...
Add a refcount around mosquitto_lib_init and mosquitto_lib_cleanup so
that multiple calls to init/cleanup don't trigger memory leaks or
double-frees.
Signed-off-by: Martin Kelly <mkelly@xevo.com>
5 years ago
Roger A. Light
762ad432e8
Fix support for openssl 3.0
5 years ago
Roger A. Light
21f203b91a
Don't treact unexpected PUBACK/COMP as fatal.
6 years ago
Roger A. Light
f0deb9a5a1
CMake: Make building clients, broker and C++ library optional.
...
Issue #1641 .
6 years ago
Karl Palsson
efb21fb09c
doc: lib clarify _topic_check functions
...
Removed some whitespace and copy paste errors.
Signed-off-by: Karl Palsson <karlp@etactica.com>
6 years ago
Karl Palsson
8c16d7cd50
doc: add mqtt5 property options.
...
This just gets them all listed, explaining the available apis where they
could be used is left as further work.
Signed-off-by: Karl Palsson <karlp@etactica.com>
6 years ago
Karl Palsson
1b4b6f4a2c
doc: lib: properly flag code samples for formatting
...
Uses the NaturalDocs 1.5 compatible style. (Forward compatible with v2)
Uses > for short snippets and the tagged style for longer snippets.
Signed-off-by: Karl Palsson <karlp@etactica.com>
6 years ago
Karl Palsson
fd83d2274f
doc: lib: avoid unintended code formatting
...
Signed-off-by: Karl Palsson <karlp@etactica.com>
6 years ago
Karl Palsson
1331399228
doc: lib: specifically document mqtt5_sub_options
...
This makes the documentation of the options available in
https://mosquitto.org/api/files/mosquitto-h.html#mosquitto_subscribe_v5
a lot cleaner. (and also _subscribe_multiple())
Signed-off-by: Karl Palsson <karlp@etactica.com>
6 years ago
Karl Palsson
d46707fe02
doc: lib_vesion: correctly format return values
...
Signed-off-by: Karl Palsson <karlp@etactica.com>
6 years ago
Karl Palsson
765f7343c2
doc: lib: _xxx_option() and opts_set() cleanup list syntax
...
This change improves the option list rendering by correctly triggering
naturaldocs detection of the lists. No change other than line breaks
and whitespace.
Signed-off-by: Karl Palsson <karlp@etactica.com>
6 years ago
Karl Palsson
6c7ef15112
doc: lib: group all _option functions together.
...
_string_option was grouped with the callbacks instead of _int_option and
_void_option. Grouped them all together neatly.
Signed-off-by: Karl Palsson <karlp@etactica.com>
6 years ago
Roger A. Light
a16d7e0661
iDon't treat an unexpected PUBREL as fatal.
...
Issue #1629 . Thanks to radcrabs.
6 years ago
Roger A. Light
346f695937
Separate out delay code from previous commit.
...
Plus add missing header.
6 years ago
Roger A. Light
5cf94d2e57
Merge branch 'fixes' of git://github.com/ChristianS99/mosquitto into fixes
6 years ago
Roger A. Light
7f41e37f0f
Fix use of sed on BSD.
...
Closes #1614 . Thanks to Christoph Krey.
6 years ago
Roger A. Light
c84d175b3d
Fixes for the poor souls stuck on <c99.
...
Closes #1622 .
6 years ago
Roger A. Light
d96543c0b8
Merge branch 'fixes' into develop
6 years ago
Roger A. Light
b544b46156
Update version.
6 years ago
Roger A. Light
b0a065f790
Update changelog. Release page. Bump copyright.
6 years ago
Roger A. Light
b6a54a21d8
Remove duplicate code.
6 years ago
Roger A. Light
8d5fd7d1e2
Fix `mosquitto_topic_matches_sub()` behaviour with wildcards in topic.
...
It was not returning MOSQ_ERR_INVAL if the topic contains a wildcard.
Closes #1589 . Thanks to mdelete.
6 years ago
Roger A. Light
2a8c1d03f5
Merge branch 'coverity-fixes' into fixes
6 years ago
Gianfranco Costamagna
7a5c2d4da5
Bugfix: include "deps" directory only if BUNDLED_DEPS has been provided and set to true
...
Signed-off-by: Gianfranco Costamagna <costamagnagianfranco@yahoo.it>
6 years ago
Roger A. Light
3a89059271
Don't call SSL_shutdown() if SSL init hasn't completed.
6 years ago
Roger A. Light
07c54627e9
Print OpenSSL errors in more situations
...
Covers when loading certificates fails, or there are ENGINE problems.
Closes #1552 . Thanks to Michael Richardson.
6 years ago
Roger A. Light
27b4518d7e
Improve password file parsing in the broker and mosqitto_passwd.
...
Closes #1584 . Thanks to panava.
6 years ago
Roger A. Light
e188a6b500
More whitespace trimming fixes/consolidation.
6 years ago
Roger A. Light
70fd600c3a
Fix trailing whitespace not being trimmed on acl users.
...
Closes #1539 . Thanks to CliveJL and LeonPoon.
6 years ago
Roger A. Light
81641df043
Expose net__print_ssl_error() prototype.
6 years ago
Roger A. Light
11ece604c4
Merge branch 'bugfix-MemLeak_in_handle_unsubscribe' of git://github.com/panava/mosquitto into panava-bugfix-MemLeak_in_handle_unsubscribe
6 years ago
Roger A. Light
89b55094c0
Merge branch 'bugfix-NullDeref_in_util_mosc.c' of git://github.com/panava/mosquitto into panava-bugfix-NullDeref_in_util_mosc.c
6 years ago
Roger A. Light
50735afb5b
Fix for internal logging not printing.
6 years ago
Panagiotis Vasilikos
dd6d8237cb
Potential Null pointer dereference in util_mosq.c
...
Reason: There is no check that the mosquitto__malloc at line 162 was sucessfull.
This could result to a Null pointer dereference in the memcpy call at line 166.
Fix: I added the check.
Signed-off-by: Panagiotis Vasilikos <panagiotis.vasilikos@alexandra.dk>
6 years ago
Roger A. Light
8f1c8cba59
Set minimum keepalive argument to `mosquitto_connect*()` to be 5 seconds.
...
Closes #1550 . Thanks to Markus Gothe.
6 years ago
Panagiotis Vasilikos
caeb211cc5
Memory leak in socks_mosq.c
...
Reason: The memory allocated for the packet pointer at line 155 is not freed
before returning at line 188.
Fix: I inserted the mosquitto__free(packet) statement just before returning
at line 188.
Signed-off-by: Panagiotis Vasilikos <panagiotis.vasilikos@alexandra.dk>
6 years ago
Roger A. Light
4408339dbc
Make consts unsigned where they are compared against unsigned.
6 years ago
Roger A. Light
05ec02b3f3
Remove dead values.
6 years ago
Roger A. Light
d60e86d2a3
Add TCP_NODELAY support to lib and clients.
...
Closes #1526 . Thanks to Felix Moessbauer.
6 years ago
Christian Schneider
a3ebeff9d7
fix: replace sleep with (p)select in loop_forever
...
sleep was blocking loop_stop(force=false) since it
was uniteruptible
Signed-off-by: Christian Schneider <cschneider@radiodata.biz>
6 years ago
Roger A. Light
c0443637e8
Merge branch 'master'
...
Conflicts:
ChangeLog.txt
config.mk
src/context.c
src/loop.c
src/subs.c
test/broker/01-connect-bad-packet.py
test/broker/02-subpub-qos1-bad-pubcomp.py
test/broker/02-subpub-qos1-bad-pubrec.py
test/broker/02-subpub-qos2-bad-puback-1.py
test/broker/02-subpub-qos2-bad-puback-2.py
test/broker/02-subpub-qos2-bad-pubcomp.py
test/broker/02-subpub-qos2.py
test/broker/07-will-null-topic.py
6 years ago
Roger A. Light
b410568299
Bump version, add release post.
6 years ago
Roger A. Light
c37251c53d
Document `mosquitto_connect_srv()`.
...
Closes #1499 . Thanks to Basavesh Shivakumar.
6 years ago
Roger A. Light
91961d93c4
Merge branch 'master' of git://github.com/basavesh/mosquitto into basavesh-master
6 years ago
Basavesh Shivakumar
7c34ed2eeb
Delete duplicate 'Returns' messages in the comments.
...
Signed-off-by: Basavesh Shivakumar <basavesh.shivakumar@gmail.com>
6 years ago
Roger A. Light
d003fed383
MQTT v5 bridges can handle "retain-available" being false.
6 years ago
Roger A. Light
2af260ba58
Add `bridge_outgoing_retain` option
...
This allows outgoing messages from a bridge to have the retain bit
completely disabled, which is useful when bridging to e.g. Amazon or
Google.
6 years ago
Roger A. Light
88c83fe6b5
mosquitto_pub now handles the MQTT v5 retain-available property
...
It will not set the retain bit if retain-available is false.
6 years ago
Roger A. Light
e6e7fc961d
Fix function in wrong doc section.
6 years ago
Roger A. Light
463fe8fc6c
Fix document issues in mosquitto.h.
...
Closes #1478 . Thanks to Liam Fry.
6 years ago
Roger A. Light
47dadb902d
Only call ERR_clear_error() after an error has occurred.
6 years ago
Roger Light
2f8573b456
Add property helper functions.
...
mosquitto_property_identifier()
mosquitto_property_identifier_to_string()
mosquitto_property_next()
6 years ago
Roger Light
a65aef9232
Null terminate binary data reading.
6 years ago