Welcome! Log In Create A New Profile

Advanced

[nginx] svn commit: r4985 - trunk/src/http/modules

Anonymous User
December 23, 2012 10:28AM
Author: vbart
Date: 2012-12-23 15:27:55 +0000 (Sun, 23 Dec 2012)
New Revision: 4985
URL: http://trac.nginx.org/nginx/changeset/4985/nginx

Log:
Access log: fixed redundant buffer reallocation.

Previously a new buffer was allocated for every "access_log" directive with the
same file path and "buffer=" parameters, while only one buffer per file is used.



Modified:
trunk/src/http/modules/ngx_http_log_module.c

Modified: trunk/src/http/modules/ngx_http_log_module.c
===================================================================
--- trunk/src/http/modules/ngx_http_log_module.c 2012-12-22 20:03:38 UTC (rev 4984)
+++ trunk/src/http/modules/ngx_http_log_module.c 2012-12-23 15:27:55 UTC (rev 4985)
@@ -970,11 +970,15 @@
return NGX_CONF_ERROR;
}

- if (log->file->buffer && log->file->last - log->file->pos != buf) {
- ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
- "access_log \"%V\" already defined "
- "with different buffer size", &value[1]);
- return NGX_CONF_ERROR;
+ if (log->file->buffer) {
+ if (log->file->last - log->file->pos != buf) {
+ ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
+ "access_log \"%V\" already defined "
+ "with different buffer size", &value[1]);
+ return NGX_CONF_ERROR;
+ }
+
+ return NGX_CONF_OK;
}

log->file->buffer = ngx_palloc(cf->pool, buf);

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] svn commit: r4985 - trunk/src/http/modules

Anonymous User 937 December 23, 2012 10:28AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 172
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready