Commit Graph

133 Commits (1d230bd255d7cd4a1e813517c71675f1b64caddc)

Author SHA1 Message Date
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
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 906a515704 Simplify client message properties, only one is used. 4 years ago
Roger A. Light fb76fd66b9 Remove some unused struct members. 4 years ago
Roger A. Light 5177dd4d40 Use random last db id, unless later overwritten by persistence. 4 years ago
Roger Light 0eb7391e71 Fix tests and db_dump compilation. 4 years ago
Roger A. Light 8a03b5ad5c Function for checking if a context is connected. 4 years ago
Roger Light fecf550cad Fix test. 5 years ago
Roger A. Light 706a1f3f29 Fix more minor compiler warnings. 5 years ago
Roger A. Light fdd624cec4 Fix tests now uhpa has been removed. 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 4d9afc835b Fix missing functions in test. 5 years ago
Roger A. Light 899695261a Fix invalid character conversions in test. 5 years ago
Roger A. Light 4f61f6c161 Fix conversion errors. 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