Fix logdir config handling

git-svn-id: http://repo.ham.fi/svn/aprsc/trunk@791 3ce903b1-3385-4e86-93cd-f9a4a239f7ac
This commit is contained in:
Heikki Hannikainen 2012-09-01 11:14:49 +00:00
parent 5c0ab36f5b
commit a55cb1844d
2 changed files with 6 additions and 8 deletions

View File

@ -36,7 +36,6 @@ char *cfgfile = def_cfgfile;
char *pidfile;
char *new_rundir;
char *rundir;
char *logdir; /* access logs go here */
//char *new_webdir;
char *webdir = def_webdir;
char *chrootdir = NULL;
@ -1055,7 +1054,7 @@ int read_config(void)
failed = 1;
}
}
if (!logdir) {
if (!log_dir) {
hlog(LOG_CRIT, "Config: logdir not defined.");
failed = 1;
}
@ -1205,8 +1204,8 @@ int read_config(void)
return -1;
if (!pidfile) {
s = hmalloc(strlen(logdir) + 10 + 3);
sprintf(s, "%s/%s.pid", logdir, logname);
s = hmalloc(strlen(log_dir) + 10 + 3);
sprintf(s, "%s/%s.pid", log_dir, logname);
pidfile = s;
}
@ -1220,9 +1219,9 @@ int read_config(void)
void free_config(void)
{
if (logdir)
hfree(logdir);
logdir = NULL;
if (log_dir)
hfree(log_dir);
log_dir = NULL;
if (rundir)
hfree(rundir);
rundir = NULL;

View File

@ -67,7 +67,6 @@ extern char *cfgfile;
extern char *pidfile;
extern char *rundir;
extern char *webdir;
extern char *logdir;
extern char *logname;
extern char *chrootdir;
extern char *setuid_s;