Fix online reconfiguration: Test rundir usability in the correct place.
It was tested in reconfiguration, using a null pointer.
This commit is contained in:
parent
f20f5ca656
commit
149cf2bb5b
12
src/config.c
12
src/config.c
|
|
@ -1243,6 +1243,7 @@ int read_config(void)
|
|||
* for the first time.
|
||||
*/
|
||||
if (!rundir) {
|
||||
/* initial setup */
|
||||
if (new_rundir) {
|
||||
rundir = new_rundir;
|
||||
new_rundir = NULL;
|
||||
|
|
@ -1250,16 +1251,17 @@ int read_config(void)
|
|||
hlog(LOG_CRIT, "Config: rundir not defined.");
|
||||
failed = 1;
|
||||
}
|
||||
|
||||
if (test_directory(rundir)) {
|
||||
hlog(LOG_CRIT, "Config: rundir %s is not a directory.", rundir);
|
||||
failed = 1;
|
||||
}
|
||||
} else {
|
||||
/* reconfig */
|
||||
if (new_rundir) {
|
||||
hfree(new_rundir);
|
||||
new_rundir = NULL;
|
||||
}
|
||||
|
||||
if (test_directory(new_rundir)) {
|
||||
hlog(LOG_CRIT, "Config: rundir %s is not a directory.", new_rundir);
|
||||
failed = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (!log_dir) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue