diff --git a/src/ChangeLog b/src/ChangeLog index dd2e2cc146eaf534065e7a9f28e26bfec490abf7..0d48864b9e18dc00a86483e9893d2c289b6e1230 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2009-08-29 Derek R. Price <derek@ximbiot.com> + + * parseinfo.c (new_config): Initialize new property. + (parse_config): Store existence of user-specified LogHistory directive + per config file rather than globally. + * parseinfo.h (struct config): Add new usingDefaultLogHistory boolean. + 2009-08-03 Derek R. Price <derek@ximbiot.com> * parseinfo.c (parse_config): Find alternate config files correctly. diff --git a/src/parseinfo.c b/src/parseinfo.c index 6743b939dfda92330c8165a1143bb03a9100ee17..4631f46b9dc68b792e62bc648ec23f6d90b08e2c 100644 --- a/src/parseinfo.c +++ b/src/parseinfo.c @@ -316,6 +316,7 @@ new_config (void) TRACE (TRACE_FLOW, "new_config ()"); new->logHistory = xstrdup (ALL_HISTORY_REC_TYPES); + new->usingDefaultLogHistory = true; new->RereadLogAfterVerify = LOGMSG_REREAD_ALWAYS; new->FirstVerifyLogErrorFatal = true; new->UserAdminOptions = xstrdup ("k"); @@ -677,13 +678,12 @@ parse_config (const char *cvsroot, const char *path) { if (!STREQ (p, "all")) { - static bool gotone = false; - if (gotone) + if (retval->usingDefaultLogHistory) + retval->usingDefaultLogHistory = false; + else error (0, 0, "\ %s [%u]: warning: duplicate LogHistory entry found.", infopath, ln); - else - gotone = true; free (retval->logHistory); retval->logHistory = xstrdup (p); } diff --git a/src/parseinfo.h b/src/parseinfo.h index d3ef9d267ce45144c92a200d603596c86854fda3..04fdd64412170552423c1f3a69b38c285208fe23 100644 --- a/src/parseinfo.h +++ b/src/parseinfo.h @@ -27,7 +27,10 @@ struct config void *keywords; bool top_level_admin; char *lock_dir; + char *logHistory; + bool usingDefaultLogHistory; + char *HistoryLogPath; char *HistorySearchPath; char *TmpDir;