Commit graph

887 commits

Author SHA1 Message Date
Roger A. Light
475a708d30 Fix openssl 3 deprecations. 2023-01-11 22:34:08 +00:00
Roger A. Light
343a984083 Big rejig of library tests
Includes full consistency between C/C++ library tests
2023-01-02 11:45:09 +00:00
Roger Light
9ee1dc5294
Merge pull request #2712 from NorbertHeusser/cleanup-include-guards
Cleanup of include guard defines
2022-12-22 15:37:05 +00:00
Roger A. Light
2e4db3aa2a Improve test/client/02-subscribe-format-json-properties.py 2022-12-22 13:39:57 +00:00
Norbert Heusser
ba5f8eb448 Cleanup of include guard defines
Signed-off-by: Norbert Heusser <norbert.heusser@cedalo.com>
2022-12-21 15:35:38 +00:00
Roger A. Light
f70806f6e7 Don't try to set TCP_NODELAY for unix sockets. 2022-12-19 15:24:22 +00:00
Roger Light
ac5dfca52a
Merge pull request #2703 from NorbertHeusser/makefile-improvements
Makefile improvements
2022-12-16 15:58:01 +00:00
Norbert Heusser
a65176667c Fixed cleanup in lib/Makefile
Signed-off-by: Norbert Heusser <norbert.heusser@cedalo.com>
2022-12-09 18:03:39 +00:00
Roger A. Light
b157448b30 Fix possible memory leaks when repeating options. 2022-12-07 22:44:09 +00:00
Roger A. Light
fa21712278 Fix accidentally deleted lines. 2022-12-07 16:50:59 +00:00
Roger A. Light
d15c6bd7ef Fix unitialised value and incorrect loop. 2022-12-07 15:26:13 +00:00
Roger A. Light
fc84340820 Add mosquitto_unsubscribe2_v5_callback_set 2022-12-07 15:05:54 +00:00
Roger A. Light
7419aa7530 Add more lib msg sequence tests 2022-12-07 15:05:54 +00:00
Roger A. Light
57665e722d Remove obsolete openssl cleanup code 2022-12-05 17:04:28 +00:00
Roger A. Light
001b8d7da8 Remove duplicate code 2022-12-05 17:04:12 +00:00
Roger A. Light
94b366b5e7 Start of message sequence "fuzzish" tests for library 2022-12-05 17:03:58 +00:00
Roger A. Light
d53653b017 Port from fixes 2022-12-03 23:41:15 +00:00
Roger A. Light
1e0a07ba5a Add missing int to string conversions. 2022-12-01 11:35:48 +00:00
Roger A. Light
d64331603c Don't use TLS v1.1 by default. 2022-11-30 14:36:32 +00:00
Roger A. Light
b8b1674183 Tidy unused defs. 2022-11-08 17:23:46 +00:00
Roger A. Light
1382fded00 Compile picohttpparser only once 2022-11-03 22:39:39 +00:00
Roger A. Light
65a6191202 Set mosquitto_read_*() values to NULL when empty
`mosquitto_property_read_binary/string/string_pair` will now set the
name/value parameter to NULL if the binary/string is empty. This aligns the
behaviour with other property functions.

Closes #2648. Thanks to Alexander Fiebig.
2022-11-03 18:31:19 +00:00
Roger A. Light
dcea1a9c89 Merge branch 'fix-mosquitto-client-sub-count' of https://github.com/buschulte/mosquitto into buschulte-fix-mosquitto-client-sub-count 2022-11-03 16:31:53 +00:00
Roger A. Light
4fed95b572 Merge subleaf and client_sub structs to simplify use. 2022-11-03 15:47:24 +00:00
Kai Buschulte
32588f45ab Introduce subs_count for client subscriptions
This is the actual number of subscriptions.

Signed-off-by: Kai Buschulte <kai.buschulte@cedalo.com>
2022-11-03 09:37:10 +01:00
Kai Buschulte
31cdd26230 Rename sub_count to subs_capacity
sub_count is not the actual number of subscriptions.
Renamed it to subs_capacity, as it keeps the value of allocated
mosquitto__client_sub elements stored in the subs member of the
mosquitto struct.

Signed-off-by: Kai Buschulte <kai.buschulte@cedalo.com>
2022-11-03 09:37:10 +01:00
Roger A. Light
27941ae9c2 Fix Coverity Scan 1499830 2022-10-16 14:48:26 +01:00
Kai Buschulte
c646172c05 set mqtt v5 callbacks in C++ wrapper of lib
This caused "unused function" warnings

Signed-off-by: Kai Buschulte <kai.buschulte@cedalo.com>
2022-08-29 11:21:50 +00:00
Roger A. Light
f5a09992be Fix cpp include build 2022-08-17 19:52:30 +01:00
Roger A. Light
fd68bf00c7 Merge branch 'master' into develop 2022-08-17 16:18:24 +01:00
Roger A. Light
49ebb58569 Fix failure to close thread in some situations.
Closes #2545. Thanks to p-luke.
2022-08-15 22:17:00 +01:00
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.
2022-08-10 17:18:33 +01:00
Roger A. Light
6468bb4f9b Fix documentation omission around mosquitto_reinitialise.
Closes #2489. Thanks to rroguski
2022-08-10 14:31:34 +01:00
Roger A. Light
e979a46c04 Backport SSL connect fixes.
Closes #2594.
Closes #2595.
2022-08-09 21:25:54 +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
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
0c9d9f2163 Don't set SIGPIPE to ignore, use MSG_NOSIGNAL instead.
Closes #2564. Thanks to nmeum.
2022-08-07 23:04:46 +01:00
Roger A. Light
4cfbb716be Remove unused member 2022-08-05 21:53:17 +01:00
Roger Light
ac98c2135f
Merge pull request #2529 from NorbertHeusser/develop
Create github actions to trigger build and tests on devevlop branch
2022-08-03 10:10:57 +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
Roger A. Light
25bc6f3cf4 Require topics>0 in mosquitto_[un]subscribe*(). 2022-07-20 16:55:26 +01:00
Norbert Heusser
f424667fca Merge branch 'develop' into NorbertHeusser:develop 2022-07-08 09:30:53 +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
436635fda8 Use absolute rather than relative paths when installing. 2022-06-22 22:43:39 +01:00
Roger Light
38295aeca3
Merge pull request #2559 from newAM/fix-mosquittopp-path
Fix install path to mosquittopp.h
2022-06-22 22:26:09 +01:00
Roger A. Light
546df9db85 Build fixes, particularly pedantic compiler warnings. 2022-06-14 22:29:05 +01:00
Alex Martens
bb33c503b6 Fix install path to mosquittopp.h
Signed-off-by: Alex Martens <eclipse@thinglab.org>
2022-06-05 15:39:48 -07:00