- Fix -o
not working in mosquitto_ctrl
, and typo in related documentation.
Closes #2471. Thanks to Vitaljok and rillbert
This commit is contained in:
parent
6468bb4f9b
commit
f9fa19ce6a
@ -33,6 +33,11 @@ Clients:
|
||||
- Fix mosquitto_pub incorrectly reusing topic aliases when reconnecting.
|
||||
Closes #2494.
|
||||
|
||||
Apps:
|
||||
- Fix `-o` not working in `mosquitto_ctrl`, and typo in related documentation.
|
||||
Closes #2471.
|
||||
|
||||
|
||||
2.0.14 - 2021-11-17
|
||||
===================
|
||||
|
||||
|
@ -89,13 +89,14 @@ int ctrl_config_parse(struct mosq_config *cfg, int *argc, char **argv[])
|
||||
|
||||
init_config(cfg);
|
||||
|
||||
rc = client_config_load(cfg);
|
||||
if(rc) return rc;
|
||||
|
||||
/* Deal with real argc/argv */
|
||||
rc = client_config_line_proc(cfg, argc, argv);
|
||||
if(rc) return rc;
|
||||
|
||||
/* Load options from config file - this must be after `-o` has been processed */
|
||||
rc = client_config_load(cfg);
|
||||
if(rc) return rc;
|
||||
|
||||
#ifdef WITH_TLS
|
||||
if((cfg->certfile && !cfg->keyfile) || (cfg->keyfile && !cfg->certfile)){
|
||||
fprintf(stderr, "Error: Both certfile and keyfile must be provided if one of them is set.\n");
|
||||
@ -531,7 +532,7 @@ int client_config_load(struct mosq_config *cfg)
|
||||
fclose(fptr);
|
||||
return 1;
|
||||
}
|
||||
while(fgets(line, 1024, fptr)){
|
||||
while(fgets(line, sizeof(line), fptr)){
|
||||
if(line[0] == '#') continue; /* Comments */
|
||||
|
||||
while(line[strlen(line)-1] == 10 || line[strlen(line)-1] == 13){
|
||||
|
@ -389,9 +389,9 @@ admin username and any other options once and not have to add them to the
|
||||
command line every time.
|
||||
|
||||
mosquitto_ctrl will try to load a configuration file from a default location.
|
||||
For Windows this is at `%USER_PROFILE%\mosquitto_ctrl.conf`. For other systems,
|
||||
it will try `$XDG_CONFIG_HOME/mosquitto_ctrl.conf` or
|
||||
`$HOME/.config/mosquitto_ctrl.conf`.
|
||||
For Windows this is at `%USER_PROFILE%\mosquitto_ctrl`. For other systems,
|
||||
it will try `$XDG_CONFIG_HOME/mosquitto_ctrl` or
|
||||
`$HOME/.config/mosquitto_ctrl`.
|
||||
|
||||
You may override this behaviour by manually specifying an options file with
|
||||
`-o <path to options file>`.
|
||||
|
Loading…
Reference in New Issue
Block a user