Fix check when loading persistence file of a different version

Closes #1684. Thanks to grekhss.
pull/1691/head
Roger A. Light 5 years ago
parent 762ad432e8
commit eae8c9aab4

@ -8,6 +8,8 @@ Broker:
- Don't disconnect clients that are already disconnected. This prevents the
session expiry being extended on SIGHUP. Closes #1521.
- Fix support for openssl 3.0.
- Fix check when loading persistence file of a different version than the
native version. Closes #1684.
Client library:
- Don't treat an unexpected PUBACK, PUBREL, or PUBCOMP as a fatal error.

@ -415,7 +415,7 @@ int persist__restore(struct mosquitto_db *db)
/* IMPORTANT - this is where compatibility checks are made.
* Is your DB change still compatible with previous versions?
*/
if(db_version > MOSQ_DB_VERSION && db_version != 0){
if(db_version != MOSQ_DB_VERSION){
if(db_version == 4){
}else if(db_version == 3){
/* Addition of source_username and source_port to msg_store chunk in v4, v1.5.6 */

Loading…
Cancel
Save