From 7fe638786dfd33619ef779dfced3cfb61978a796 Mon Sep 17 00:00:00 2001 From: "Roger A. Light" Date: Sat, 6 Feb 2021 23:43:42 +0000 Subject: [PATCH] Fix mosquitto_evt_tick struct members. --- ChangeLog.txt | 8 ++++++++ include/mosquitto_broker.h | 5 +++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 3831823ed9..db224ae5ba 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,3 +1,11 @@ +Broker: +- Fix incorrect datatypes in `struct mosquitto_evt_tick`. This changes the + size and offset of two of the members of this struct, and changes the size + of the struct. This is an ABI break, but is considered to be acceptable + because plugins should never be allocating their own instance of this + struct, and currently none of the struct members are used for anything, so a + plugin should not be accessing them. + Clients: - Fix possible loss of data in `mosquitto_pub -l` when sending multiple long lines. Closes #2078. diff --git a/include/mosquitto_broker.h b/include/mosquitto_broker.h index 9653cab93e..a2aff4955e 100644 --- a/include/mosquitto_broker.h +++ b/include/mosquitto_broker.h @@ -37,6 +37,7 @@ extern "C" { #include #include #include +#include struct mosquitto; typedef struct mqtt5__property mosquitto_property; @@ -157,8 +158,8 @@ struct mosquitto_evt_tick { void *future; long now_ns; long next_ns; - int now_s; - int next_s; + time_t now_s; + time_t next_s; void *future2[4]; };