Mercurial > hg > nginx-ranges
diff src/core/ngx_output_chain.c @ 635:e67b227c8dbb default tip
Merge with current.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Mon, 25 Apr 2011 04:07:55 +0400 |
parents | c5122335e41d |
children |
line wrap: on
line diff
--- a/src/core/ngx_output_chain.c +++ b/src/core/ngx_output_chain.c @@ -74,18 +74,18 @@ ngx_output_chain(ngx_output_chain_ctx_t } } -#if (NGX_HAVE_FILE_AIO) - if (ctx->aio) { - return NGX_AGAIN; - } -#endif - out = NULL; last_out = &out; last = NGX_NONE; for ( ;; ) { +#if (NGX_HAVE_FILE_AIO) + if (ctx->aio) { + return NGX_AGAIN; + } +#endif + while (ctx->in) { /* @@ -465,10 +465,7 @@ ngx_output_chain_copy_buf(ngx_output_cha dst = ctx->buf; size = ngx_buf_size(src); - - if (size > dst->end - dst->pos) { - size = dst->end - dst->pos; - } + size = ngx_min(size, dst->end - dst->pos); sendfile = ctx->sendfile & !ctx->directio;