Commit Graph

150 Commits (2e36d523c8e07d7391847ed6ecfe26a1aa5eadb9)

Author SHA1 Message Date
Roger A. Light 2e36d523c8 Rename mosquitto_base_msg -> mosquitto__base_msg 3 years ago
Roger A. Light 1e0a07ba5a Add missing int to string conversions. 3 years ago
Roger A. Light fa08918b48 Don't recompile objects for tests (in Makefile tests) 3 years ago
Roger A. Light a2e5bb5294 Merge branch 'fix-compiler-warnings' of https://github.com/buschulte/mosquitto into buschulte-fix-compiler-warnings 3 years ago
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.
3 years ago
Kai Buschulte e6f5633ff6 Fix some compiler warnings
Signed-off-by: Kai Buschulte <kai.buschulte@cedalo.com>
3 years ago
Roger A. Light 59ec303372 Fix Coverity Scan 1499851 3 years ago
Roger A. Light edfb2278f8 Fix CMake test build 3 years ago
Roger A. Light c43099f98c Fix Coverity Scan 1499822 3 years ago
Roger A. Light 3df0179c01 Fix Coverity Scan 1499800 3 years ago
Roger A. Light 5b44035eba Fix Coverity Scan 1499798, 1499803, 1499813. 3 years ago
Roger A. Light 3250d20fc8 Fix Coverity Scan 1499800 3 years ago
Roger A. Light a000ca2b60 Fix test leak 3 years ago
Roger A. Light 3544d935e0 Fix various Coverity Scan issues. 3 years ago
Roger A. Light 44cf973abb Fix Coverity Scan 982726 3 years ago
Roger A. Light f0d7c27a67 Add tests to coverity scan 3 years ago
Roger A. Light afc575aa1c Simplify function calls. 3 years ago
Roger A. Light 4997b40259 Report persistence stats when starting. 3 years ago
Roger A. Light fd68bf00c7 Merge branch 'master' into develop 3 years ago
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>
3 years ago
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>
3 years ago
Roger A. Light 3e1cf8a80b Fix tests build. 3 years ago
Roger A. Light 4487b98dbb Fix clean 3 years ago
Roger A. Light b4a0255f1c Process retain persist events only every 10 seconds. 4 years ago
Roger A. Light cbb01193a0 Rename persist retain_add to retain_set 4 years ago
Roger A. Light 2d3b152a22 Rename of mosquitto_msg_store struct.
struct mosquitto_msg_store -> struct mosquitto_base_msg

This is the base message which client messages and retained messages
refer to. The base messages are still held in the message store.

This change comes about because the persistence interface exposes these
message types. Prior to this commit the different messages were "msg",
"client_msg", and "retain". After this commit there is "base_msg",
"client_msg", and and "retain_msg" in the persist interface.
4 years ago
Roger A. Light ffb7661d86 Move shared code to common directory
This is currently limited to "utility" type functions and does not include code common to the library and broker that are protocol related.
4 years ago
Roger A. Light 5a3b42d4a4 Use path vars in Makefiles. 4 years ago
Roger A. Light df2a4a666f Add missing hunk from previous commit. 4 years ago
Roger A. Light 6f8ced5038 Test fixes. 4 years ago
Roger A. Light d546ba461a Test fixes. 4 years ago
Roger A. Light 6e8925c062 Test fix. 4 years ago
Roger A. Light 0f8733627a Plugin persistence interface. 4 years ago
Roger A. Light 2501a64035 Merge branch 'master' into develop 4 years ago
Roger A. Light affe6ece83 Add client msg int to allow easier ordering for plugins. 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 0d0a36906c Add missing stubs. 4 years ago
Roger A. Light e09390eda6 Split db__message_insert into incoming/outgoing. 4 years ago
Roger A. Light 9ad8d943be Stored messages now always stored in a hash table. 4 years ago
Roger A. Light a1288721ce Fix tests 4 years ago
Roger A. Light 8ac11929cc Merge branch 'master' into develop 4 years ago
Roger A. Light b9b065d2cc Compiler pedantry, and more checks in tests. 4 years ago
Roger Light 9d3f292b39 Send DISCONNECT With session-takeover return code.
This is for MQTT v5 clients when a client connects with the same client id.

Closes #2340. Thanks to hvxl.
4 years ago
Roger Light 51eda2bf79 Add more efficient keepalive check. 4 years ago
Roger A. Light a1a190b482 Pointless whitespace tidy. 4 years ago
Roger A. Light c28110d079 Fix test 4 years ago
Roger A. Light aa29b45e70 Merge branch 'master' into develop 4 years ago
Roger Light ba2ca33671 Strict protocol compliance fixes, and extensive test suite. 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