|
|
|
@ -1382,17 +1382,17 @@ int _config_read_file_core(struct mqtt3_config *config, bool reload, const char
|
|
|
|
|
_mosquitto_log_printf(NULL, MOSQ_LOG_ERR, "Error: Empty max_queued_messages value in configuration.");
|
|
|
|
|
}
|
|
|
|
|
}else if(!strcmp(token, "memory_limit")){
|
|
|
|
|
size_t lim;
|
|
|
|
|
ssize_t lim;
|
|
|
|
|
if(_conf_parse_int(&token, "memory_limit", (int *)&lim, saveptr)) return MOSQ_ERR_INVAL;
|
|
|
|
|
if(lim < 0){
|
|
|
|
|
_mosquitto_log_printf(NULL, MOSQ_LOG_ERR, "Error: Invalid memory_limit value (%lu).", lim);
|
|
|
|
|
_mosquitto_log_printf(NULL, MOSQ_LOG_ERR, "Error: Invalid memory_limit value (%ld).", lim);
|
|
|
|
|
return MOSQ_ERR_INVAL;
|
|
|
|
|
}
|
|
|
|
|
memory__set_limit(lim);
|
|
|
|
|
}else if(!strcmp(token, "message_size_limit")){
|
|
|
|
|
if(_conf_parse_int(&token, "message_size_limit", (int *)&config->message_size_limit, saveptr)) return MOSQ_ERR_INVAL;
|
|
|
|
|
if(config->message_size_limit > MQTT_MAX_PAYLOAD){
|
|
|
|
|
_mosquitto_log_printf(NULL, MOSQ_LOG_ERR, "Error: Invalid message_size_limit value (%d).", config->message_size_limit);
|
|
|
|
|
_mosquitto_log_printf(NULL, MOSQ_LOG_ERR, "Error: Invalid message_size_limit value (%u).", config->message_size_limit);
|
|
|
|
|
return MOSQ_ERR_INVAL;
|
|
|
|
|
}
|
|
|
|
|
}else if(!strcmp(token, "mount_point")){
|
|
|
|
|