From 31f7f6a5410c258e9ad85a4b166804bc57b4c0b9 Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Wed, 12 May 2004 05:37:55 +0000 Subject: nginx-0.0.3-2004-05-12-09:37:55 import --- src/core/ngx_output_chain.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'src/core/ngx_output_chain.c') diff --git a/src/core/ngx_output_chain.c b/src/core/ngx_output_chain.c index 94e410495..b54cbafa8 100644 --- a/src/core/ngx_output_chain.c +++ b/src/core/ngx_output_chain.c @@ -81,7 +81,11 @@ int ngx_output_chain(ngx_output_chain_ctx_t *ctx, ngx_chain_t *in) ctx->hunk = ctx->free->hunk; ctx->free = ctx->free->next; - } else if (ctx->hunks < ctx->bufs.num) { + } else if (out || ctx->hunks == ctx->bufs.num) { + + break; + + } else { size = ctx->bufs.size; @@ -118,9 +122,6 @@ int ngx_output_chain(ngx_output_chain_ctx_t *ctx, ngx_chain_t *in) ctx->hunk->tag = ctx->tag; ctx->hunk->type |= NGX_HUNK_RECYCLED; ctx->hunks++; - - } else { - break; } } @@ -148,10 +149,6 @@ int ngx_output_chain(ngx_output_chain_ctx_t *ctx, ngx_chain_t *in) *last_out = cl; last_out = &cl->next; ctx->hunk = NULL; - - if (ctx->free == NULL) { - break; - } } if (out == NULL && last != NGX_NONE) { -- cgit