Commit graph

3227 commits

Author SHA1 Message Date
Roger A. Light
1e4dbd81fd Update mosquitto_[un]subscribe*() requirements. 2022-07-20 20:04:05 +01:00
Roger Light
cb562e5da2
Merge pull request #2583 from buschulte/coverage
CMake: introduce a coverage target
2022-07-20 17:20:51 +01:00
Roger A. Light
25bc6f3cf4 Require topics>0 in mosquitto_[un]subscribe*(). 2022-07-20 16:55:26 +01:00
Roger A. Light
4093e717f9 Minor refactor 2022-07-07 13:38:52 +01:00
Kai Buschulte
f486b45619 CMake: introduce a coverage target
to produce coverage information while running the tests, call cmake with
the following options:

cmake -DCMAKE_C_FLAGS=-coverage -DCMAKE_CXX_FLAGS=-coverage <build-dir>

Signed-off-by: Kai Buschulte <kai.buschulte@cedalo.com>
2022-07-01 10:26:58 +02:00
Roger Light
a3d94359f9
Merge pull request #2581 from buschulte/cmake-with-test-option
Introduce a CMake WITH_TESTS option
2022-06-30 09:09:07 +01:00
Roger Light
c4e74319ac
Merge pull request #2580 from buschulte/fix-cmake-build-for-older-versions
Fix CMake build for versions <3.19
2022-06-30 09:08:39 +01:00
Kai Buschulte
5b02490fd2 Introduce a CMake WITH_TESTS option
To enable or disable tests in the build step and to circumvent the
CUnit build dependency.

Signed-off-by: Kai Buschulte <kai.buschulte@cedalo.com>
2022-06-29 15:49:39 +02:00
Kai Buschulte
d66702ba37 Fix CMake build for versions <3.19
CMake <3.19 does not support interface targets with sources.
For better IDE integrations we still can add the config.h using the
`target_sources` command.

Signed-off-by: Kai Buschulte <kai.buschulte@cedalo.com>
2022-06-29 15:31:19 +02:00
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>
2022-06-22 23:56:50 +01:00
Kai Buschulte
0fe397603b Workaround problem with sqlite3-wal files
These files are not removed but empty for some versions of sqlite3

Signed-off-by: Kai Buschulte <kai.buschulte@cedalo.com>
2022-06-22 23:56:09 +01:00
Kai Buschulte
4eadc96bcb Add Traceback to failing packet_match
This helps finding the caller/cause of the failure

Signed-off-by: Kai Buschulte <kai.buschulte@cedalo.com>
2022-06-22 23:56:09 +01:00
Kai Buschulte
8b5a86fd52 Introduce config-header cmake target
This is an interface cmake target which specifies include directories
required by the config.h places in the root of the project.

This header is a "public" header visible to plugins linking the
mosquitto exports.

Signed-off-by: Kai Buschulte <kai.buschulte@cedalo.com>
2022-06-22 23:56:09 +01: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
Norbert Heusser
71e1b92564 Fixed race condition in test/broker/11-persistent-subscription-no-local.py 2022-06-22 23:56:09 +01:00
Roger Light
6c1bb33e86
Merge pull request #2573 from buschulte/throw-broken-pipe-error-when-loosing-connection
throw BrokenPipeError if nothing received on socket
2022-06-22 23:06:16 +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
34391080d6 Add dynsec init by simple file. 2022-06-22 17:33:39 +01:00
Kai Buschulte
a7304083f8 throw BrokenPipeError if nothing received on sock
instead of ignoring this error, we throw an exception
the previous way might cause hard to find issues

Signed-off-by: Kai Buschulte <kai.buschulte@cedalo.com>
2022-06-22 13:17:20 +02: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
Roger A. Light
29f49bf6ab Publish global out_packet values to $SYS 2022-06-04 22:40:48 +01:00
Roger A. Light
4099f8d1b6 Store out_packet bytes rather than having to calculate it. 2022-06-02 23:02:17 +01:00
Roger A. Light
e3246f547c Print messages in mosquitto_passwd when adding/updating passwords.
Closes #2544. Thanks to Shruti Nanda.
2022-05-25 17:15:04 +01:00
Roger A. Light
fe32e2506b Add more mosquitto_passwd examples 2022-05-19 15:28:37 +01:00
Roger A. Light
2c8dc3968e Migrate persist-sqlite to use persistence_location. 2022-05-18 15:11:13 +01:00
Roger A. Light
26b007f3fc Fix Coverity 1488816, use of uninitialised value. 2022-05-13 16:54:29 +01:00
Roger Light
6bce50cb65
Merge pull request #2532 from buschulte/fixes-for-kqueue-memory-issue
Fix memory issues in kqueue operations
2022-05-12 15:21:16 +01:00
Roger A. Light
bf3a73a1cb Merge branch 'buschulte-macos-cmake-build' into develop 2022-05-12 12:10:21 +01:00
Roger A. Light
51f9a76f03 Merge branch 'macos-cmake-build' of https://github.com/buschulte/mosquitto into buschulte-macos-cmake-build 2022-05-12 12:10:11 +01:00
Roger A. Light
e346288785 Merge branch 'buschulte-cmake-use-preinstalled-sqlite3-find-module' into develop 2022-05-12 11:52:00 +01:00
Roger A. Light
1749432382 Merge branch 'cmake-use-preinstalled-sqlite3-find-module' of https://github.com/buschulte/mosquitto into buschulte-cmake-use-preinstalled-sqlite3-find-module 2022-05-12 11:51:15 +01:00
Kai Buschulte
a3125934dd Fix macOS compile issues
Signed-off-by: Kai Buschulte <kai.buschulte@cedalo.com>
2022-05-11 07:01:22 +00:00
Kai Buschulte
7e4746aac4 Fix missing symbols MacOS
Core symbols needed by plugins are now properly linked to their objects

 * Remove link_directories() call:

This specification is not necessary for our own libraries as cmake
shares this information over the targets.

If needed they should be specified target specific, like done for
the external DLT library.

Signed-off-by: Kai Buschulte <kai.buschulte@cedalo.com>
2022-05-11 07:01:22 +00:00
Kai Buschulte
0e9df05d0d Add imported target for cJSON
Signed-off-by: Kai Buschulte <kai.buschulte@cedalo.com>
2022-05-11 07:01:17 +00:00
Kai Buschulte
15208e55cc Use preinstalled CMake find module for SQLite3
CMake >= 3.14 comes with a preinstalled FindSQLite3 module, which now
replaces the self-written one.

Signed-off-by: Kai Buschulte <kai.buschulte@cedalo.com>
2022-05-10 16:44:34 +02:00
Kai Buschulte
6568984054 Fix memory issues in kqueue operations
Signed-off-by: Kai Buschulte <kai.buschulte@cedalo.com>
2022-05-10 16:28:54 +02:00
Roger A. Light
50dc039905 Migrate Coverity Scan run to GH actions
This is pending the addition of secrets.
2022-05-09 23:07:16 +01:00
Roger A. Light
4487b98dbb Fix clean 2022-05-08 21:53:14 +01:00
Roger A. Light
634d75a5b2 Alphabetise 2022-05-08 21:49:17 +01:00
Roger Light
572e840b2f
Merge pull request #2527 from abiliojr/test_config
broker: add command line argument to test configuration and exit
2022-05-08 21:48:06 +01:00
Abilio Marques
102c275764 broker: add command line argument to test configuration and exit
Signed-off-by: Abilio Marques <abiliojr@gmail.com>
2022-05-07 10:00:40 +02:00
Roger A. Light
5731dd8653 Add mosquitto_persistence_location() for plugins. 2022-05-05 16:18:54 +01:00
Roger A. Light
1da29c9e51 Fix -f and -s options in mosquitto_rr. 2022-05-04 22:25:51 +01:00
Roger A. Light
ab1803d72f Fix casting. 2022-04-29 22:12:55 +01:00
Roger A. Light
7f273e41d0 Merge branch 'abiliojr-sqlite_flush_page_options' into develop 2022-04-29 22:12:18 +01:00
Roger A. Light
5d483689bc Merge branch 'sqlite_flush_page_options' of https://github.com/abiliojr/mosquitto into abiliojr-sqlite_flush_page_options 2022-04-29 22:12:10 +01:00
Roger A. Light
a84b5abb69 Update changelog and sort documentation order. 2022-04-29 22:02:41 +01:00
Roger A. Light
1ed8020057 Merge branch 'mlyszczek-add-float-format' into develop 2022-04-29 21:48:02 +01:00