mirror of
https://github.com/eclipse/mosquitto.git
synced 2025-05-09 01:01:11 +08:00
Fix persistence_location not appending a '/'.
This commit is contained in:
parent
99e8c8001d
commit
f930970008
@ -9,6 +9,7 @@ Broker:
|
||||
Closes #1956.
|
||||
- Fix local bridges being disconnected on SIGHUP. Closes #1942.
|
||||
- Fix slow initial bridge connections for WITH_ADNS=no.
|
||||
- Fix persistence_location not appending a '/'.
|
||||
|
||||
Clients:
|
||||
- Fix mosquitto_sub being unable to terminate with Ctrl-C if a successful
|
||||
|
@ -664,7 +664,11 @@ int config__read(struct mosquitto__config *config, bool reload)
|
||||
len = strlen(config->persistence_location) + strlen(config->persistence_file) + 1;
|
||||
config->persistence_filepath = mosquitto__malloc(len);
|
||||
if(!config->persistence_filepath) return MOSQ_ERR_NOMEM;
|
||||
snprintf(config->persistence_filepath, len, "%s%s", config->persistence_location, config->persistence_file);
|
||||
#ifdef WIN32
|
||||
snprintf(config->persistence_filepath, len, "%s\\%s", config->persistence_location, config->persistence_file);
|
||||
#else
|
||||
snprintf(config->persistence_filepath, len, "%s/%s", config->persistence_location, config->persistence_file);
|
||||
#endif
|
||||
}else{
|
||||
config->persistence_filepath = mosquitto__strdup(config->persistence_file);
|
||||
if(!config->persistence_filepath) return MOSQ_ERR_NOMEM;
|
||||
|
Loading…
x
Reference in New Issue
Block a user