comparison src/core/ngx_output_chain.c @ 3119:4c90c9129a82

fix case when the output filter should add incoming buffers while waiting on file AIO completion
author Igor Sysoev <igor@sysoev.ru>
date Sun, 13 Sep 2009 06:28:17 +0000
parents 5ea5a90000d5
children cbb1add4a6fe
comparison
equal deleted inserted replaced
3118:6f79fac538b9 3119:4c90c9129a82
71 if (in) { 71 if (in) {
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
77 #if (NGX_HAVE_FILE_AIO)
78 if (ctx->aio) {
79 return NGX_AGAIN;
80 }
81 #endif
76 82
77 out = NULL; 83 out = NULL;
78 last_out = &out; 84 last_out = &out;
79 last = NGX_NONE; 85 last = NGX_NONE;
80 86
517 523
518 #endif 524 #endif
519 525
520 #if (NGX_HAVE_FILE_AIO) 526 #if (NGX_HAVE_FILE_AIO)
521 527
522 if (ctx->aio) { 528 if (ctx->aio_handler) {
523 n = ngx_file_aio_read(src->file, dst->pos, (size_t) size, 529 n = ngx_file_aio_read(src->file, dst->pos, (size_t) size,
524 src->file_pos, ctx->pool); 530 src->file_pos, ctx->pool);
525 if (n == NGX_AGAIN) { 531 if (n == NGX_AGAIN) {
526 ctx->aio(ctx, src->file); 532 ctx->aio_handler(ctx, src->file);
527 return NGX_AGAIN; 533 return NGX_AGAIN;
528 } 534 }
529 535
530 } else { 536 } else {
531 n = ngx_read_file(src->file, dst->pos, (size_t) size, 537 n = ngx_read_file(src->file, dst->pos, (size_t) size,