Mercurial > hg > nginx
comparison src/event/ngx_event_pipe.c @ 1714:6b81bbc36eaf stable-0.5
r1566 merge:
fix English grammar
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Wed, 12 Dec 2007 16:57:36 +0000 |
parents | e2ab812358bd |
children | 412742b3e60e |
comparison
equal
deleted
inserted
replaced
1713:389aeafc3b84 | 1714:6b81bbc36eaf |
---|---|
190 } | 190 } |
191 | 191 |
192 chain->buf = b; | 192 chain->buf = b; |
193 chain->next = NULL; | 193 chain->next = NULL; |
194 | 194 |
195 } else if (!p->cachable | 195 } else if (!p->cacheable |
196 && p->downstream->data == p->output_ctx | 196 && p->downstream->data == p->output_ctx |
197 && p->downstream->write->ready | 197 && p->downstream->write->ready |
198 && !p->downstream->write->delayed) | 198 && !p->downstream->write->delayed) |
199 { | 199 { |
200 /* | 200 /* |
207 ngx_log_debug0(NGX_LOG_DEBUG_EVENT, p->log, 0, | 207 ngx_log_debug0(NGX_LOG_DEBUG_EVENT, p->log, 0, |
208 "pipe downstream ready"); | 208 "pipe downstream ready"); |
209 | 209 |
210 break; | 210 break; |
211 | 211 |
212 } else if (p->cachable | 212 } else if (p->cacheable |
213 || p->temp_file->offset < p->max_temp_file_size) | 213 || p->temp_file->offset < p->max_temp_file_size) |
214 { | 214 { |
215 | 215 |
216 /* | 216 /* |
217 * if it is allowed, then save some bufs from r->in | 217 * if it is allowed, then save some bufs from r->in |
404 } | 404 } |
405 } | 405 } |
406 } | 406 } |
407 } | 407 } |
408 | 408 |
409 if (p->cachable && p->in) { | 409 if (p->cacheable && p->in) { |
410 if (ngx_event_pipe_write_chain_to_temp_file(p) == NGX_ABORT) { | 410 if (ngx_event_pipe_write_chain_to_temp_file(p) == NGX_ABORT) { |
411 return NGX_ABORT; | 411 return NGX_ABORT; |
412 } | 412 } |
413 } | 413 } |
414 | 414 |
540 | 540 |
541 p->out = p->out->next; | 541 p->out = p->out->next; |
542 | 542 |
543 ngx_event_pipe_free_shadow_raw_buf(&p->free_raw_bufs, cl->buf); | 543 ngx_event_pipe_free_shadow_raw_buf(&p->free_raw_bufs, cl->buf); |
544 | 544 |
545 } else if (!p->cachable && p->in) { | 545 } else if (!p->cacheable && p->in) { |
546 cl = p->in; | 546 cl = p->in; |
547 | 547 |
548 ngx_log_debug3(NGX_LOG_DEBUG_EVENT, p->log, 0, | 548 ngx_log_debug3(NGX_LOG_DEBUG_EVENT, p->log, 0, |
549 "pipe write buf ls:%d %p %z", | 549 "pipe write buf ls:%d %p %z", |
550 cl->buf->last_shadow, | 550 cl->buf->last_shadow, |
610 ngx_chain_update_chains(&p->free, &p->busy, &out, p->tag); | 610 ngx_chain_update_chains(&p->free, &p->busy, &out, p->tag); |
611 | 611 |
612 for (cl = p->free; cl; cl = cl->next) { | 612 for (cl = p->free; cl; cl = cl->next) { |
613 | 613 |
614 if (cl->buf->temp_file) { | 614 if (cl->buf->temp_file) { |
615 if (p->cachable || !p->cyclic_temp_file) { | 615 if (p->cacheable || !p->cyclic_temp_file) { |
616 continue; | 616 continue; |
617 } | 617 } |
618 | 618 |
619 /* reset p->temp_offset if all bufs had been sent */ | 619 /* reset p->temp_offset if all bufs had been sent */ |
620 | 620 |
657 | 657 |
658 } else { | 658 } else { |
659 out = p->in; | 659 out = p->in; |
660 } | 660 } |
661 | 661 |
662 if (!p->cachable) { | 662 if (!p->cacheable) { |
663 | 663 |
664 size = 0; | 664 size = 0; |
665 cl = out; | 665 cl = out; |
666 ll = NULL; | 666 ll = NULL; |
667 | 667 |