[465438] Fix incorrect behaviour for autosave_interval.

Thanks to Jaime Yu.

Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=465438
pull/211/merge
Roger A. Light 10 years ago
parent a330c5ca17
commit e0037b348f

@ -1,6 +1,8 @@
Broker:
- Fix incorrect bridge notification on initial connection. Closes #467096.
- Build fixes for OpenBSD.
- Fix incorrect behaviour for autosave_interval, most noticable for
autosave_interval=1. Closes #465438.
Client library:
- Add missing error strings to mosquitto_strerror.

@ -331,7 +331,7 @@ int mosquitto_main_loop(struct mosquitto_db *db, mosq_sock_t *listensock, int li
#ifdef WITH_PERSISTENCE
if(db->config->persistence && db->config->autosave_interval){
if(db->config->autosave_on_changes){
if(db->persistence_changes > db->config->autosave_interval){
if(db->persistence_changes >= db->config->autosave_interval){
mqtt3_db_backup(db, false);
db->persistence_changes = 0;
}

Loading…
Cancel
Save