diff --git a/ChangeLog.txt b/ChangeLog.txt index 4734e6f6c0..20f79dd6f0 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -45,6 +45,7 @@ Clients: - Fix MQTT v5 clients not being able to specify a password without a username. Closes #1274. - Fix `mosquitto_pub -l` not handling network failures. Closes #1152. +- Fix `mosquitto_pub -l` not handling zero length input. Closes #1302. - Fix double free on exit in mosquitto_pub. Closes #1280. Documentation: diff --git a/client/pub_shared.c b/client/pub_shared.c index e1de3f0a6c..008bef4e5f 100644 --- a/client/pub_shared.c +++ b/client/pub_shared.c @@ -36,7 +36,7 @@ and the Eclipse Distribution License is available at /* Global variables for use in callbacks. See sub_client.c for an example of * using a struct to hold variables for use in callbacks. */ -int mid_sent = 0; +int mid_sent = -1; int status = STATUS_CONNECTING; struct mosq_config cfg;