Mercurial > hg > nginx-quic
comparison src/http/ngx_http_request.c @ 2962:19f9a5eae383 stable-0.7
merge r2952:
ignore ngx_atomic_fetch_add() result
this fixes building at least by gcc 4.2.1 on Mac OS X 10.6
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 22 Jun 2009 09:31:33 +0000 |
parents | 7d8667499ddc |
children | 501fd3ae3188 |
comparison
equal
deleted
inserted
replaced
2961:31526449835f | 2962:19f9a5eae383 |
---|---|
196 rev = c->read; | 196 rev = c->read; |
197 rev->handler = ngx_http_init_request; | 197 rev->handler = ngx_http_init_request; |
198 c->write->handler = ngx_http_empty_handler; | 198 c->write->handler = ngx_http_empty_handler; |
199 | 199 |
200 #if (NGX_STAT_STUB) | 200 #if (NGX_STAT_STUB) |
201 ngx_atomic_fetch_add(ngx_stat_reading, 1); | 201 (void) ngx_atomic_fetch_add(ngx_stat_reading, 1); |
202 #endif | 202 #endif |
203 | 203 |
204 if (rev->ready) { | 204 if (rev->ready) { |
205 /* the deferred accept(), rtsig, aio, iocp */ | 205 /* the deferred accept(), rtsig, aio, iocp */ |
206 | 206 |
215 | 215 |
216 ngx_add_timer(rev, c->listening->post_accept_timeout); | 216 ngx_add_timer(rev, c->listening->post_accept_timeout); |
217 | 217 |
218 if (ngx_handle_read_event(rev, 0) != NGX_OK) { | 218 if (ngx_handle_read_event(rev, 0) != NGX_OK) { |
219 #if (NGX_STAT_STUB) | 219 #if (NGX_STAT_STUB) |
220 ngx_atomic_fetch_add(ngx_stat_reading, -1); | 220 (void) ngx_atomic_fetch_add(ngx_stat_reading, -1); |
221 #endif | 221 #endif |
222 ngx_http_close_connection(c); | 222 ngx_http_close_connection(c); |
223 return; | 223 return; |
224 } | 224 } |
225 } | 225 } |
245 struct sockaddr_in6 *sin6; | 245 struct sockaddr_in6 *sin6; |
246 ngx_http_in6_addr_t *addr6; | 246 ngx_http_in6_addr_t *addr6; |
247 #endif | 247 #endif |
248 | 248 |
249 #if (NGX_STAT_STUB) | 249 #if (NGX_STAT_STUB) |
250 ngx_atomic_fetch_add(ngx_stat_reading, -1); | 250 (void) ngx_atomic_fetch_add(ngx_stat_reading, -1); |
251 #endif | 251 #endif |
252 | 252 |
253 c = rev->data; | 253 c = rev->data; |
254 | 254 |
255 if (rev->timedout) { | 255 if (rev->timedout) { |
495 ctx->request = r; | 495 ctx->request = r; |
496 ctx->current_request = r; | 496 ctx->current_request = r; |
497 r->log_handler = ngx_http_log_error_handler; | 497 r->log_handler = ngx_http_log_error_handler; |
498 | 498 |
499 #if (NGX_STAT_STUB) | 499 #if (NGX_STAT_STUB) |
500 ngx_atomic_fetch_add(ngx_stat_reading, 1); | 500 (void) ngx_atomic_fetch_add(ngx_stat_reading, 1); |
501 r->stat_reading = 1; | 501 r->stat_reading = 1; |
502 ngx_atomic_fetch_add(ngx_stat_requests, 1); | 502 (void) ngx_atomic_fetch_add(ngx_stat_requests, 1); |
503 #endif | 503 #endif |
504 | 504 |
505 rev->handler(rev); | 505 rev->handler(rev); |
506 } | 506 } |
507 | 507 |
1542 if (c->read->timer_set) { | 1542 if (c->read->timer_set) { |
1543 ngx_del_timer(c->read); | 1543 ngx_del_timer(c->read); |
1544 } | 1544 } |
1545 | 1545 |
1546 #if (NGX_STAT_STUB) | 1546 #if (NGX_STAT_STUB) |
1547 ngx_atomic_fetch_add(ngx_stat_reading, -1); | 1547 (void) ngx_atomic_fetch_add(ngx_stat_reading, -1); |
1548 r->stat_reading = 0; | 1548 r->stat_reading = 0; |
1549 ngx_atomic_fetch_add(ngx_stat_writing, 1); | 1549 (void) ngx_atomic_fetch_add(ngx_stat_writing, 1); |
1550 r->stat_writing = 1; | 1550 r->stat_writing = 1; |
1551 #endif | 1551 #endif |
1552 | 1552 |
1553 c->read->handler = ngx_http_request_handler; | 1553 c->read->handler = ngx_http_request_handler; |
1554 c->write->handler = ngx_http_request_handler; | 1554 c->write->handler = ngx_http_request_handler; |
2314 if (b->pos < b->last) { | 2314 if (b->pos < b->last) { |
2315 | 2315 |
2316 ngx_log_debug0(NGX_LOG_DEBUG_HTTP, c->log, 0, "pipelined request"); | 2316 ngx_log_debug0(NGX_LOG_DEBUG_HTTP, c->log, 0, "pipelined request"); |
2317 | 2317 |
2318 #if (NGX_STAT_STUB) | 2318 #if (NGX_STAT_STUB) |
2319 ngx_atomic_fetch_add(ngx_stat_reading, 1); | 2319 (void) ngx_atomic_fetch_add(ngx_stat_reading, 1); |
2320 #endif | 2320 #endif |
2321 | 2321 |
2322 hc->pipeline = 1; | 2322 hc->pipeline = 1; |
2323 c->log->action = "reading client pipelined request line"; | 2323 c->log->action = "reading client pipelined request line"; |
2324 | 2324 |
2544 } | 2544 } |
2545 | 2545 |
2546 b->last += n; | 2546 b->last += n; |
2547 | 2547 |
2548 #if (NGX_STAT_STUB) | 2548 #if (NGX_STAT_STUB) |
2549 ngx_atomic_fetch_add(ngx_stat_reading, 1); | 2549 (void) ngx_atomic_fetch_add(ngx_stat_reading, 1); |
2550 #endif | 2550 #endif |
2551 | 2551 |
2552 c->log->handler = ngx_http_log_error; | 2552 c->log->handler = ngx_http_log_error; |
2553 c->log->action = "reading client request line"; | 2553 c->log->action = "reading client request line"; |
2554 | 2554 |
2773 } | 2773 } |
2774 | 2774 |
2775 #if (NGX_STAT_STUB) | 2775 #if (NGX_STAT_STUB) |
2776 | 2776 |
2777 if (r->stat_reading) { | 2777 if (r->stat_reading) { |
2778 ngx_atomic_fetch_add(ngx_stat_reading, -1); | 2778 (void) ngx_atomic_fetch_add(ngx_stat_reading, -1); |
2779 } | 2779 } |
2780 | 2780 |
2781 if (r->stat_writing) { | 2781 if (r->stat_writing) { |
2782 ngx_atomic_fetch_add(ngx_stat_writing, -1); | 2782 (void) ngx_atomic_fetch_add(ngx_stat_writing, -1); |
2783 } | 2783 } |
2784 | 2784 |
2785 #endif | 2785 #endif |
2786 | 2786 |
2787 if (error && r->headers_out.status == 0) { | 2787 if (error && r->headers_out.status == 0) { |
2858 } | 2858 } |
2859 | 2859 |
2860 #endif | 2860 #endif |
2861 | 2861 |
2862 #if (NGX_STAT_STUB) | 2862 #if (NGX_STAT_STUB) |
2863 ngx_atomic_fetch_add(ngx_stat_active, -1); | 2863 (void) ngx_atomic_fetch_add(ngx_stat_active, -1); |
2864 #endif | 2864 #endif |
2865 | 2865 |
2866 c->destroyed = 1; | 2866 c->destroyed = 1; |
2867 | 2867 |
2868 pool = c->pool; | 2868 pool = c->pool; |