comparison 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
comparison
equal deleted inserted replaced
578:f3a9e57d2e17 635:e67b227c8dbb
72 if (ngx_output_chain_add_copy(ctx->pool, &ctx->in, in) == NGX_ERROR) { 72 if (ngx_output_chain_add_copy(ctx->pool, &ctx->in, in) == NGX_ERROR) {
73 return NGX_ERROR; 73 return NGX_ERROR;
74 } 74 }
75 } 75 }
76 76
77 #if (NGX_HAVE_FILE_AIO)
78 if (ctx->aio) {
79 return NGX_AGAIN;
80 }
81 #endif
82
83 out = NULL; 77 out = NULL;
84 last_out = &out; 78 last_out = &out;
85 last = NGX_NONE; 79 last = NGX_NONE;
86 80
87 for ( ;; ) { 81 for ( ;; ) {
82
83 #if (NGX_HAVE_FILE_AIO)
84 if (ctx->aio) {
85 return NGX_AGAIN;
86 }
87 #endif
88 88
89 while (ctx->in) { 89 while (ctx->in) {
90 90
91 /* 91 /*
92 * cycle while there are the ctx->in bufs 92 * cycle while there are the ctx->in bufs
463 463
464 src = ctx->in->buf; 464 src = ctx->in->buf;
465 dst = ctx->buf; 465 dst = ctx->buf;
466 466
467 size = ngx_buf_size(src); 467 size = ngx_buf_size(src);
468 468 size = ngx_min(size, dst->end - dst->pos);
469 if (size > dst->end - dst->pos) {
470 size = dst->end - dst->pos;
471 }
472 469
473 sendfile = ctx->sendfile & !ctx->directio; 470 sendfile = ctx->sendfile & !ctx->directio;
474 471
475 #if (NGX_SENDFILE_LIMIT) 472 #if (NGX_SENDFILE_LIMIT)
476 473