per_listener_settings true must come before other security settings.

Produce error if this is not the case. Closes #1164, thanks to
momoskitto.
This commit is contained in:
Roger A. Light 2019-02-08 22:47:25 +00:00
parent 9378016b19
commit 2e1c2c430f
2 changed files with 4 additions and 1 deletions

View File

@ -3,6 +3,8 @@
Broker:
- Fix build failure when using WITH_ADNS=yes
- Ensure that an error occurs if `per_listener_settings true` is given after
other security options. Closes #1149.
1.5.6 - 20190206

View File

@ -62,6 +62,8 @@ struct config_recurse {
extern SERVICE_STATUS_HANDLE service_handle;
#endif
static struct mosquitto__security_options *cur_security_options = NULL;
static int conf__parse_bool(char **token, const char *name, bool *value, char *saveptr);
static int conf__parse_int(char **token, const char *name, int *value, char *saveptr);
static int conf__parse_ssize_t(char **token, const char *name, ssize_t *value, char *saveptr);
@ -743,7 +745,6 @@ int config__read_file_core(struct mosquitto__config *config, bool reload, struct
struct mosquitto__listener *cur_listener = &config->default_listener;
int i;
int lineno_ext;
struct mosquitto__security_options *cur_security_options = NULL;
*lineno = 0;