diff options
author | Igor Sysoev <igor@sysoev.ru> | 2004-05-12 05:37:55 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2004-05-12 05:37:55 +0000 |
commit | 31f7f6a5410c258e9ad85a4b166804bc57b4c0b9 (patch) | |
tree | fc7e941d377f9059784e4cfcaa3ac81d1ff2a197 /src/core/ngx_output_chain.c | |
parent | d365af4a15a86f4d3f2774b197ef417dbce8a164 (diff) | |
download | nginx-31f7f6a5410c258e9ad85a4b166804bc57b4c0b9.tar.gz nginx-31f7f6a5410c258e9ad85a4b166804bc57b4c0b9.zip |
nginx-0.0.3-2004-05-12-09:37:55 import
Diffstat (limited to 'src/core/ngx_output_chain.c')
-rw-r--r-- | src/core/ngx_output_chain.c | 13 |
1 files changed, 5 insertions, 8 deletions
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) { |