Mercurial > hg > nginx-vendor-0-8
comparison src/event/ngx_event_accept.c @ 44:4989c3d25945 NGINX_0_1_22
nginx 0.1.22
*) Bugfix: the ngx_http_stub_status_module showed incorrect handled
connections statistics if the proxying or FastCGI server were used.
*) Bugfix: the installation paths were incorrectly quoted on Linux and
Solaris; bug appeared in 0.1.21.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Tue, 22 Feb 2005 00:00:00 +0300 |
parents | 41ccba1aba45 |
children | 72eb30262aac |
comparison
equal
deleted
inserted
replaced
43:95fe5f51bcdb | 44:4989c3d25945 |
---|---|
116 return; | 116 return; |
117 } | 117 } |
118 | 118 |
119 #if (NGX_STAT_STUB) | 119 #if (NGX_STAT_STUB) |
120 ngx_atomic_inc(ngx_stat_accepted); | 120 ngx_atomic_inc(ngx_stat_accepted); |
121 ngx_atomic_inc(ngx_stat_active); | |
121 #endif | 122 #endif |
122 | 123 |
123 ngx_accept_disabled = (ngx_uint_t) s + NGX_ACCEPT_THRESHOLD | 124 ngx_accept_disabled = (ngx_uint_t) s + NGX_ACCEPT_THRESHOLD |
124 - ecf->connections; | 125 - ecf->connections; |
125 | 126 |
135 | 136 |
136 ngx_close_accepted_socket(s, log); | 137 ngx_close_accepted_socket(s, log); |
137 ngx_destroy_pool(pool); | 138 ngx_destroy_pool(pool); |
138 return; | 139 return; |
139 } | 140 } |
140 | |
141 #if (NGX_STAT_STUB) | |
142 ngx_atomic_inc(ngx_stat_active); | |
143 #endif | |
144 | 141 |
145 /* set a blocking mode for aio and non-blocking mode for others */ | 142 /* set a blocking mode for aio and non-blocking mode for others */ |
146 | 143 |
147 if (ngx_inherited_nonblocking) { | 144 if (ngx_inherited_nonblocking) { |
148 if ((ngx_event_flags & NGX_USE_AIO_EVENT)) { | 145 if ((ngx_event_flags & NGX_USE_AIO_EVENT)) { |
261 * or protection by critical section or light mutex | 258 * or protection by critical section or light mutex |
262 */ | 259 */ |
263 | 260 |
264 c->number = ngx_atomic_inc(ngx_connection_counter); | 261 c->number = ngx_atomic_inc(ngx_connection_counter); |
265 | 262 |
263 #if (NGX_STAT_STUB) | |
264 ngx_atomic_inc(ngx_stat_handled); | |
265 #endif | |
266 | |
266 #if (NGX_THREADS) | 267 #if (NGX_THREADS) |
267 rev->lock = &c->lock; | 268 rev->lock = &c->lock; |
268 wev->lock = &c->lock; | 269 wev->lock = &c->lock; |
269 rev->own_lock = &c->lock; | 270 rev->own_lock = &c->lock; |
270 wev->own_lock = &c->lock; | 271 wev->own_lock = &c->lock; |
450 { | 451 { |
451 if (ngx_close_socket(s) == -1) { | 452 if (ngx_close_socket(s) == -1) { |
452 ngx_log_error(NGX_LOG_ALERT, log, ngx_socket_errno, | 453 ngx_log_error(NGX_LOG_ALERT, log, ngx_socket_errno, |
453 ngx_close_socket_n " failed"); | 454 ngx_close_socket_n " failed"); |
454 } | 455 } |
456 | |
457 #if (NGX_STAT_STUB) | |
458 ngx_atomic_dec(ngx_stat_active); | |
459 #endif | |
455 } | 460 } |
456 | 461 |
457 | 462 |
458 static u_char * | 463 static u_char * |
459 ngx_accept_log_error(ngx_log_t *log, u_char *buf, size_t len) | 464 ngx_accept_log_error(ngx_log_t *log, u_char *buf, size_t len) |