Skip to content

Commit

Permalink
Added loading of upgrade_bridge_qos.
Browse files Browse the repository at this point in the history
Added loading of upgrade_bridge_qos from mosquitto.conf (related to issue eclipse#203).
  • Loading branch information
peppo65 committed Jul 5, 2016
1 parent 6fa6ff0 commit 9e81a69
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/conf.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ static void _config_init_reload(struct mqtt3_config *config)
config->retry_interval = 20;
config->sys_interval = 10;
config->upgrade_outgoing_qos = false;
config->upgrade_bridge_qos = false;
if(config->auth_options){
for(i=0; i<config->auth_option_count; i++){
_mosquitto_free(config->auth_options[i].key);
Expand Down Expand Up @@ -224,7 +225,6 @@ void mqtt3_config_cleanup(struct mqtt3_config *config)
if(config->persistence_file) _mosquitto_free(config->persistence_file);
if(config->persistence_filepath) _mosquitto_free(config->persistence_filepath);
if(config->psk_file) _mosquitto_free(config->psk_file);
if(config->pid_file) _mosquitto_free(config->pid_file);
if(config->listeners){
for(i=0; i<config->listener_count; i++){
if(config->listeners[i].host) _mosquitto_free(config->listeners[i].host);
Expand Down Expand Up @@ -1690,6 +1690,8 @@ int _config_read_file_core(struct mqtt3_config *config, bool reload, const char
#endif
}else if(!strcmp(token, "upgrade_outgoing_qos")){
if(_conf_parse_bool(&token, token, &config->upgrade_outgoing_qos, saveptr)) return MOSQ_ERR_INVAL;
}else if (!strcmp(token, "upgrade_bridge_qos")){
if(_conf_parse_bool(&token, token, &config->upgrade_bridge_qos, saveptr)) return MOSQ_ERR_INVAL;
}else if(!strcmp(token, "use_identity_as_username")){
#ifdef WITH_TLS
if(reload) continue; // Listeners not valid for reloading.
Expand Down

0 comments on commit 9e81a69

Please sign in to comment.