diff options
author | Rainer Jung <rjung@apache.org> | 2009-01-11 15:44:51 +0100 |
---|---|---|
committer | Rainer Jung <rjung@apache.org> | 2009-01-11 15:44:51 +0100 |
commit | 4807369a2cc14d3e01b8057c1460cb63b06e1602 (patch) | |
tree | 6692184f8a1bed1734ef3af370c9a94a04d62969 /support/rotatelogs.c | |
parent | Refactor rotatelogs to allow easier implementation (diff) | |
download | apache2-4807369a2cc14d3e01b8057c1460cb63b06e1602.tar.xz apache2-4807369a2cc14d3e01b8057c1460cb63b06e1602.zip |
Addition to r744476:
- Fix compilation error
- set correct time when forcing log file open
on startup
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@733479 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'support/rotatelogs.c')
-rw-r--r-- | support/rotatelogs.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/support/rotatelogs.c b/support/rotatelogs.c index 09d80f9b9e..290fad3e26 100644 --- a/support/rotatelogs.c +++ b/support/rotatelogs.c @@ -181,11 +181,12 @@ void doRotate(rotate_config_t *config, rotate_status_t *status) { status->nLogFDprev = status->nLogFD; status->nLogFD = NULL; + status->now = get_now(config->use_localtime, config->utc_offset); if (config->tRotation) { tLogStart = (status->now / config->tRotation) * config->tRotation; } else { - tLogStart = get_now(config->use_localtime, config->utc_offset); + tLogStart = status->now; } if (config->use_strftime) { @@ -341,7 +342,7 @@ int main (int argc, const char * const argv[]) exit(3); } checkRotate(&config, &status); - if (status->needsRotate) { + if (status.needsRotate) { doRotate(&config, &status); } |