comparison src/event/ngx_event_pipe.c @ 1040:d536a2332385

fix FastCGI "zero size buf" alert, the previous commit did not fix too
author Igor Sysoev <igor@sysoev.ru>
date Thu, 18 Jan 2007 07:07:55 +0000
parents 73f18b6ad6ba
children 1ade5def878d
comparison
equal deleted inserted replaced
1039:73f18b6ad6ba 1040:d536a2332385
516 for ( ;; ) { 516 for ( ;; ) {
517 if (p->out) { 517 if (p->out) {
518 cl = p->out; 518 cl = p->out;
519 519
520 if (cl->buf->recycled 520 if (cl->buf->recycled
521 && cl->buf->last_shadow
522 && bsize + cl->buf->last - cl->buf->pos > p->busy_size) 521 && bsize + cl->buf->last - cl->buf->pos > p->busy_size)
523 { 522 {
524 if (!prev_last_shadow) {
525 p->in = p->in->next;
526 }
527
528 flush = 1; 523 flush = 1;
529 break; 524 break;
530 } 525 }
531
532 prev_last_shadow = cl->buf->last_shadow;
533 526
534 p->out = p->out->next; 527 p->out = p->out->next;
535 528
536 ngx_event_pipe_free_shadow_raw_buf(&p->free_raw_bufs, cl->buf); 529 ngx_event_pipe_free_shadow_raw_buf(&p->free_raw_bufs, cl->buf);
537 530
548 && cl->buf->last_shadow 541 && cl->buf->last_shadow
549 && bsize + cl->buf->last - cl->buf->pos > p->busy_size) 542 && bsize + cl->buf->last - cl->buf->pos > p->busy_size)
550 { 543 {
551 if (!prev_last_shadow) { 544 if (!prev_last_shadow) {
552 p->in = p->in->next; 545 p->in = p->in->next;
546
547 cl->next = NULL;
548
549 if (out) {
550 *ll = cl;
551 } else {
552 out = cl;
553 }
554 ll = &cl->next;
553 } 555 }
554 556
555 flush = 1; 557 flush = 1;
556 break; 558 break;
557 } 559 }