Fix saving persistent database on Windows.

Thanks to Daniel Degasperi.
pull/211/merge
Roger A. Light 11 years ago
parent 1e87697359
commit 429c892557

@ -4,6 +4,7 @@
Broker:
- Fix possible memory leak when using a topic that has a leading slash. Fixes
bug #1360985.
- Fix saving persistent database on Windows.
Client library:
- Fix mutex being incorrectly passed by value. Fixes bug #1373785.

@ -402,6 +402,12 @@ int mqtt3_db_backup(struct mosquitto_db *db, bool cleanup, bool shutdown)
fclose(db_fptr);
#ifdef WIN32
if(remove(db->config->persistence_filepath) != 0){
goto error;
}
}
#endif
if(rename(outfile, db->config->persistence_filepath) != 0){
goto error;
}

Loading…
Cancel
Save