version 1.1, 2013/10/14 10:32:48
|
version 1.1.1.2, 2014/06/15 20:20:06
|
Line 446 FREE_FUNC(mod_accesslog_free) {
|
Line 446 FREE_FUNC(mod_accesslog_free) {
|
free(p->config_storage); |
free(p->config_storage); |
} |
} |
|
|
free(p); |
|
if (p->syslog_logbuffer) buffer_free(p->syslog_logbuffer); |
if (p->syslog_logbuffer) buffer_free(p->syslog_logbuffer); |
|
free(p); |
|
|
return HANDLER_GO_ON; |
return HANDLER_GO_ON; |
} |
} |
Line 466 SETDEFAULTS_FUNC(log_access_open) {
|
Line 466 SETDEFAULTS_FUNC(log_access_open) {
|
|
|
if (!p) return HANDLER_ERROR; |
if (!p) return HANDLER_ERROR; |
|
|
p->config_storage = calloc(1, srv->config_context->used * sizeof(specific_config *)); | p->config_storage = calloc(1, srv->config_context->used * sizeof(plugin_config *)); |
|
|
for (i = 0; i < srv->config_context->used; i++) { |
for (i = 0; i < srv->config_context->used; i++) { |
plugin_config *s; |
plugin_config *s; |
Line 603 SIGHUP_FUNC(log_access_cycle) {
|
Line 603 SIGHUP_FUNC(log_access_cycle) {
|
s->access_logfile->used > 1 && |
s->access_logfile->used > 1 && |
s->access_logfile->ptr[0] != '|') { |
s->access_logfile->ptr[0] != '|') { |
|
|
close(s->log_access_fd); | if (-1 != s->log_access_fd) close(s->log_access_fd); |
|
|
if (-1 == (s->log_access_fd = |
if (-1 == (s->log_access_fd = |
open(s->access_logfile->ptr, O_APPEND | O_WRONLY | O_CREAT | O_LARGEFILE, 0644))) { |
open(s->access_logfile->ptr, O_APPEND | O_WRONLY | O_CREAT | O_LARGEFILE, 0644))) { |
Line 612 SIGHUP_FUNC(log_access_cycle) {
|
Line 612 SIGHUP_FUNC(log_access_cycle) {
|
|
|
return HANDLER_ERROR; |
return HANDLER_ERROR; |
} |
} |
#ifdef FD_CLOEXEC | fd_close_on_exec(s->log_access_fd); |
fcntl(s->log_access_fd, F_SETFD, FD_CLOEXEC); | |
#endif | |
} |
} |
} |
} |
|
|
Line 917 REQUESTDONE_FUNC(log_access_write) {
|
Line 915 REQUESTDONE_FUNC(log_access_write) {
|
} |
} |
#endif |
#endif |
} else if (p->conf.log_access_fd != -1) { |
} else if (p->conf.log_access_fd != -1) { |
|
force_assert(b->used > 0); |
write(p->conf.log_access_fd, b->ptr, b->used - 1); |
write(p->conf.log_access_fd, b->ptr, b->used - 1); |
} |
} |
buffer_reset(b); |
buffer_reset(b); |