aboutsummaryrefslogtreecommitdiff
path: root/src/event/ngx_event.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2005-11-26 10:11:11 +0000
committerIgor Sysoev <igor@sysoev.ru>2005-11-26 10:11:11 +0000
commitc31a9bb5e336b15f48c875e1f448f71d68f3feb9 (patch)
tree31ae2b332d1b263c858bab6ee4c21778403f181d /src/event/ngx_event.c
parent99d9a4b4c547800d582a96871416797fb446b02b (diff)
downloadnginx-release-0.3.12.tar.gz
nginx-release-0.3.12.zip
nginx-0.3.12-RELEASE importrelease-0.3.12
*) Security: if nginx was built with the ngx_http_realip_module and the "satisfy_any on" directive was used, then access and authorization directives did not work. The ngx_http_realip_module was not built and is not built by default. *) Change: the "$time_gmt" variable name was changed to "$time_local". *) Change: the "proxy_header_buffer_size" and "fastcgi_header_buffer_size" directives was renamed to the "proxy_buffer_size" and "fastcgi_buffer_size" directives. *) Feature: the ngx_http_memcached_module. *) Feature: the "proxy_buffering" directive. *) Bugfix: the changes in accept mutex handling when the "rtsig" method was used; the bug had appeared in 0.3.0. *) Bugfix: if the client sent the "Transfer-Encoding: chunked" header line, then nginx returns the 411 error. *) Bugfix: if the "auth_basic" directive was inherited from the http level, then the realm in the "WWW-Authenticate" header line was without the "Basic realm" text. *) Bugfix: if the "combined" format was explicitly specified in the "access_log" directive, then the empty lines was written to the log; the bug had appeared in 0.3.8. *) Bugfix: nginx did not run on the sparc platform under any OS except Solaris. *) Bugfix: now it is not necessary to place space between the quoted string and closing bracket in the "if" directive.
Diffstat (limited to 'src/event/ngx_event.c')
-rw-r--r--src/event/ngx_event.c25
1 files changed, 14 insertions, 11 deletions
diff --git a/src/event/ngx_event.c b/src/event/ngx_event.c
index a347e1c3d..672eac2ba 100644
--- a/src/event/ngx_event.c
+++ b/src/event/ngx_event.c
@@ -48,7 +48,6 @@ ngx_atomic_t *ngx_connection_counter = &connection_counter;
ngx_atomic_t *ngx_accept_mutex_ptr;
-ngx_atomic_t *ngx_accept_mutex_last_owner;
ngx_atomic_t *ngx_accept_mutex;
ngx_uint_t ngx_accept_mutex_held;
ngx_msec_t ngx_accept_mutex_delay;
@@ -255,7 +254,7 @@ ngx_process_events_and_timers(ngx_cycle_t *cycle)
}
if (ngx_accept_mutex_held) {
- *ngx_accept_mutex = 0;
+ (void) ngx_atomic_cmp_set(ngx_accept_mutex, ngx_pid, 0);
}
if (delta) {
@@ -471,7 +470,6 @@ ngx_event_module_init(ngx_cycle_t *cycle)
/* TODO: adjust cache line size, 128 is P4 cache line size */
size = 128 /* ngx_accept_mutex */
- + 128 /* ngx_accept_mutex_last_owner */
+ 128; /* ngx_connection_counter */
#if (NGX_STAT_STUB)
@@ -491,17 +489,16 @@ ngx_event_module_init(ngx_cycle_t *cycle)
}
ngx_accept_mutex_ptr = (ngx_atomic_t *) shared;
- ngx_accept_mutex_last_owner = (ngx_atomic_t *) (shared + 1 * 128);
- ngx_connection_counter = (ngx_atomic_t *) (shared + 2 * 128);
+ ngx_connection_counter = (ngx_atomic_t *) (shared + 1 * 128);
#if (NGX_STAT_STUB)
- ngx_stat_accepted = (ngx_atomic_t *) (shared + 3 * 128);
- ngx_stat_handled = (ngx_atomic_t *) (shared + 4 * 128);
- ngx_stat_requests = (ngx_atomic_t *) (shared + 5 * 128);
- ngx_stat_active = (ngx_atomic_t *) (shared + 6 * 128);
- ngx_stat_reading = (ngx_atomic_t *) (shared + 7 * 128);
- ngx_stat_writing = (ngx_atomic_t *) (shared + 8 * 128);
+ ngx_stat_accepted = (ngx_atomic_t *) (shared + 2 * 128);
+ ngx_stat_handled = (ngx_atomic_t *) (shared + 3 * 128);
+ ngx_stat_requests = (ngx_atomic_t *) (shared + 4 * 128);
+ ngx_stat_active = (ngx_atomic_t *) (shared + 5 * 128);
+ ngx_stat_reading = (ngx_atomic_t *) (shared + 6 * 128);
+ ngx_stat_writing = (ngx_atomic_t *) (shared + 7 * 128);
#endif
@@ -919,6 +916,12 @@ ngx_event_connections(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
return "is duplicate" ;
}
+ if (ngx_strcmp(cmd->name.data, "connections") == 0) {
+ ngx_conf_log_error(NGX_LOG_WARN, cf, 0,
+ "the \"connections\" directive is deprecated, "
+ "use the \"worker_connections\" directive instead");
+ }
+
value = cf->args->elts;
ecf->connections = ngx_atoi(value[1].data, value[1].len);
if (ecf->connections == (ngx_uint_t) NGX_ERROR) {