Commit Graph

308 Commits (b8b1674183ae4a451677cf0320222c1c53dc7f06)

Author SHA1 Message Date
Roger A. Light 40636fdce0 Simplify sub client json printing. 3 years ago
Roger A. Light 7370a7d028 rr client does support < v5.0 3 years ago
Roger A. Light fd68bf00c7 Merge branch 'master' into develop 3 years ago
Roger A. Light e5cb3d0d58 Using `-x` now sets the clients to use MQTT v5.0. 3 years ago
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>
3 years ago
Kai Buschulte 8b67883548 Remove old compatibility header support
Signed-off-by: Kai Buschulte <kai.buschulte@cedalo.com>
3 years ago
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 3 years ago
Roger A. Light 11b16756cb Windows fixes. 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
Roger A. Light 26b007f3fc Fix Coverity 1488816, use of uninitialised value. 3 years ago
Kai Buschulte 0e9df05d0d Add imported target for cJSON
Signed-off-by: Kai Buschulte <kai.buschulte@cedalo.com>
3 years ago
Roger A. Light 1da29c9e51 Fix `-f` and `-s` options in mosquitto_rr. 3 years ago
Michał Łyszczek 91bca8899c mosquitto_sub: add support to print floats
This patch adds support for two new format specifiers (%f and %d)
to print float and double data.

Generally it's not save to directly take native binary data of one machine and
print it on another one (since mosquitto is multiarch). But in case of floats
it's save to print representation of it, if __STDC_IEC_559__ is defined.

In C99 Annex F, standard we can read:
> This annex specifies C language support for the
> IEC 60559 floating-point standard.
> (...)
> An implementation that defines __STDC_IEC_559__
> shall conform to the specifications in this annex

All float printing code is behind __STDC_IEC_559__, so if that is not
defined, floating print will be disabled and error returned to user.

Documentation also describes restrictions about printing floats.

Signed-off-by: Michał Łyszczek <michal.lyszczek@bofc.pl>
3 years ago
Tobias Assarsson a9a5ac2283 Don't reuse topic alias after reconnect. 3 years ago
Roger A. Light c70a925f29 Fix Coverity Scan 1486935 Logically dead code 4 years ago
Roger A. Light a0f58f20c3 Update threaded builds.
Most specifically use -pthread instead of -lpthread.
4 years ago
Roger A. Light 5a3b42d4a4 Use path vars in Makefiles. 4 years ago
Roger A. Light bc1adfd46d CMake fixes.
Builtin websockets support.
Persist sqlite plugin build.
Broker cJSON support
Add wildcard-temp plugin.
4 years ago
Roger A. Light 223d9eae66 mosquitto_sub json output tests, and user-properties fix. 4 years ago
Roger A. Light ab67dbcacd More client tests, and an output format fix. 4 years ago
Roger A. Light 3139eb3252 More client tests. 4 years ago
Roger Light cd07f1136b Bump copyrights. 4 years ago
Roger Light 538154bd9c The `--insecure` option now disables all server certificate verification. 4 years ago
Roger A. Light 8ac11929cc Merge branch 'master' into develop 4 years ago
Roger A. Light 20d2935d81 Fix date format in mosquitto_sub output.
Closes #2353. Thanks to Norman Rasmussen.
4 years ago
Roger Light 65603da5e4 Add `-W` timeout support to Windows. 4 years ago
Roger A. Light b9b065d2cc Compiler pedantry, and more checks in tests. 4 years ago
Roger A. Light 799cdead15 Experimental custom websockets support. 4 years ago
Roger A. Light a1a190b482 Pointless whitespace tidy. 4 years ago
Roger Light 88dfac8e88 Windows threading support for the library. 4 years ago
Roger Light dbd0d6f0d8 CMake build fixes. 4 years ago
Roger A. Light 49065f03a8 Merge remote-tracking branch 'origin/fixes' into develop 4 years ago
Roger A. Light ec895f2ad3 mosquitto_sub now only needs `-t` or `-U` to run
This means that `-t` is not required in all situations.
4 years ago
Roger A. Light de0e275ccb mosquitto_sub `--watch` can now be called as `-w`. 4 years ago
Roger A. Light e4160b083a Add --watch to mosquitto_sub. 4 years ago
Roger A. Light 6028d0e33e mosquitto_sub and mosquitto_rr now open stdout in binary mode on Windows
This is so binary payloads are not modified when printing.

Thanks to Steve Mullock.
4 years ago
Roger A. Light 214feb8f6b Merge branch 'fixes' into develop 4 years ago
Roger Light be96d21e7b Fix potential double free. 4 years ago
Roger Light 0a90e62f93 CMake tidy. 4 years ago
Roger Light 07399c2f3c Fix `mosquitto_pub -l` quitting if broker unavailable.
This could occur when a message publication is attempted when the broker
is temporarily unavailable.

Closes #2187. Thanks to JsBergbau.
4 years ago
Roger A. Light c8cd3590f1 Check for NULL. 4 years ago
Roger Light e1c8f09372 Remove C++ style comments. 4 years ago
Roger Light 5434931dbc Merge branch 'fixes' of git://github.com/bk138/mosquitto into bk138-fixes 4 years ago
Roger Light ef7662ca8e Merge branch 'master' into develop 4 years ago
Roger A. Light 613489f735 Fix typo. 5 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 A. Light 8dbfdc0495 Add `--no-tls` option for all clients.
This disables all TLS options for that instance. This is useful for
negating TLS options provided in a config file, or to disable the
automatic use of TLS when using port 8883.

Closes #2180. Thanks to Elliott Balsley.
5 years ago
Roger Light efad820706 Add `-o` option for all clients loading options from a specific file. 5 years ago
Roger A. Light ec54bce037 Fix mosquitto_sub pipe close detection.
If sending mosquitto_sub output to a pipe, mosquitto_sub will now detect
that the pipe has closed and disconnect.

Closes #2164. Thanks to Frantisek Fuka.
5 years ago
Roger A. Light 7d214a445d Fix TLS-PSK mode not working with port 8883.
Closes #2152. Thanks to jetpax.
5 years ago