Commit Graph

259 Commits (54df92cdc926cc892ec199f15ac371e1843f9d06)

Author SHA1 Message Date
Roger A. Light 7d214a445d Fix TLS-PSK mode not working with port 8883.
Closes #2152. Thanks to jetpax.
5 years ago
Roger Light a5d9986cbd More compiler warning fixes. 5 years ago
Roger Light 2de8c15bc9 Minor build fixes. 5 years ago
Roger Light 9faf89be8d Set `receive-maximum` to not exceed the `-C` message count.
This is for mosquitto_sub and mosquitto_rr, to avoid potentially lost
messages.

Closes #2134. Thanks to Frantisek Fuka.
5 years ago
Roger A. Light 24920c9a08 Fix possible loss of data in `mosquitto_pub -l` when sending multiple long lines.
Closes #2078. Thanks to Ysincit.
5 years ago
Roger A. Light 6c2dca51c3 Clients: Fix config files truncating options after the first space.
Closes #2059. Thanks to Jason White.
5 years ago
Roger A. Light 706a1f3f29 Fix more minor compiler warnings. 5 years ago
Roger A. Light a4389fc9ce Fix SPDX identifiers: EDL-1.0 -> BSD-3-Clause.
The two licenses are the same.
5 years ago
Roger A. Light 370cec5edd Fixes for lots of minor build warnings highlighted by Visual Studio. 5 years ago
Roger A. Light de141540fb Fix mosquitto_sub being unable to terminate with Ctrl-C.
This occured if a successful connection was not made.

Closes #1957. Thanks to Peoh.
5 years ago
Roger A. Light 791c63372b Fix cjson include paths. 5 years ago
Roger A. Light 6ad5f19aef CMake build fixes for Windows. 5 years ago
Roger A. Light 6fe3279436 Build fixes from Windows changes. 5 years ago
Roger A. Light 26ffe1300a Various Windows build fixes. 5 years ago
Roger A. Light 550c54701e Fix cmake build when cjson not available. 5 years ago
Roger A. Light 27967f8885 Prevent possible unitialised use. 5 years ago
Roger A. Light 3731535298 Add SPDX license identifiers. 5 years ago
Roger A. Light 730fc34539 Build fix for WITH_TLS=no. 5 years ago
Roger A. Light 29c771cdd4 Add lib and client support for OS CA certs
- Add `MOSQ_OPT_TLS_USE_OS_CERTS` option, to instruct the client to load and  trust OS provided CA certificates for use with TLS connections.
- All clients now load OS provided CA certificates if used with `-L
  mqtts://...`, or if port is set to 8883 and no other CA certificates are
  used. Closes #1824.
- Add the `--tls-use-os-certs` option to all clients.

Closes #1824. Thanks to Jens Reimann.
5 years ago
Roger A. Light b169dc0b1e mosquitto_sub will quit with an error on Windows if %U is used.
Seconds since the Unix epoch is not a parameter that can be obtained
with strftime on Windows.

Closes #1908. Thanks to Danil intl.
5 years ago
Roger A. Light 584cf51ba7 Update to EPL-2.0 5 years ago
Roger A. Light d142ff69a6 Fix Coverity Scan issues.
511427
1431133
1436823
1436837
1436838
1436929
5 years ago
Roger A. Light d26534e22b Fix Coverity scan issues.
1302840
1353078
1431131
1431134
1431135
1436826
1436827
1436828
1436830
1436831
1436834
1436835
1436838
1436839
1436840
1436844
1436846
1436853
1436854
1436859
1436860
1436861
1436863
1436867
5 years ago
Dan White a65242d74a mosquitto_pub: exit if broker actively refuses a connection
Fixes eclipse/mosquitto#1904

If the broker rejects the connection, as opposed to the broker being
down, then there is no hope to establish a connection.  This adds a
status flag so we can signal to the loop that we should just exit.

Signed-off-by: Dan White <dan.white@valpo.edu>
5 years ago
Dan White 61702d7acc mosquitto_pub: exit if server becomes unreachable and QOS > 0
Fixes eclipse/mosquitto#1899

In stdin line mode, mosquitto_pub will continue running and accepting
input even if/when/after publishing fails.  This condition is reached
when it first successfully establishes a connection and the server later
is unreachable.

Exiting with a non-zero exit code allows for much easier health
monitoring when used in a long-running pipe.

Signed-off-by: Dan White <dan.white@valpo.edu>
5 years ago
Roger A. Light a0c39b193b Fix description of `-e` and `-t` arguments in mosquitto_rr.
Closes #1881. Thanks to Arnav Singh.
5 years ago
Roger A. Light 8e7e4a9d9a Clients: Give warning if keepalive too low. 5 years ago
Roger A. Light fdff255916 New dynamic security plugin. 5 years ago
Roger A. Light 4f61f6c161 Fix conversion errors. 5 years ago
Roger A. Light 89733138bb CMake build fixes. 5 years ago
Roger Light 5b4e4f047b Fix mosquitto_sub JSON printing with empty payloads. 5 years ago
Roger Light ff2636b3ae Build fix for Windows. 5 years ago
Roger A. Light c90e49af1b Merge remote-tracking branch 'origin/fixes' into develop 5 years ago
Roger A. Light e2123b2561 Add --version for all clients. 5 years ago
Roger A. Light cd33670f6a Fix build with WITH_CJSON=no 5 years ago
Roger A. Light bab8cc2a6b mosquitto_sub now supports extra format specifiers.
These are for field width and precision for some parameters.
5 years ago
Roger A. Light a224a8f217 Don't busy loop with `mosquitto_pub -l` on a slow connection. 5 years ago
Roger A. Light 9929ce0a26 All clients exit with an error exit code on CONNACK failure.
Closes #1778. Thanks to jflambert.
5 years ago
Roger A. Light 1b060bb064 Guard against use-after-free.
Coverity Scan 1431131, 1431135, 1431141.
5 years ago
Roger A. Light e272f8fbca mosquitto_pub: Close file on file too large.
This wasn't a problem because this error caused the program to
exit, so there was no real resource leak.

Coverity Scan 1430457.
5 years ago
Roger A. Light f846711ea2 mosquitto_pub now sends 0 length files without an error when using `-f`. 5 years ago
Roger A. Light cadcde52a4 Remove duplicate code.
Coverity Scan 1430458.
5 years ago
Roger A. Light 5b4b079105 mosquitto_pub: Print reason string on publish error, if it exists. 5 years ago
Abilio Marques 22ffefe7f6 remove cjson stranded reference when building WITH_CJSON=no
Signed-off-by: Abilio Marques <abiliojr@gmail.com>
5 years ago
Roger A. Light 24049b1a1e Fix mosquitto_sub %j or %J not working on Windows.
Closes #1674. Thanks to amigian74.
5 years ago
Roger A. Light c766bdfeb0 Display time out message only on SIGALRM. 5 years ago
Roger A. Light b726e2f1ec mosquitto_sub %j and %J timestamps are now in a ISO 8601 compatible format. 5 years ago
Roger A. Light 40bad1a999 Fix conversion warnings in client code
Issue #1653.
6 years ago
Roger A. Light 0da723c1ec Add `--random-filter` to mosquitto_sub. 6 years ago
Roger A. Light d96543c0b8 Merge branch 'fixes' into develop 6 years ago