diff options
author | Igor Sysoev <igor@sysoev.ru> | 2004-05-28 15:49:23 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2004-05-28 15:49:23 +0000 |
commit | 369145cef1971e4273dc59340689c2d96f84d18a (patch) | |
tree | 55f59267d9ada5160ad74168bf5721ce5b3653ff /src/os/unix/ngx_aio_write_chain.c | |
parent | 87a7d1c44917e352e336c859c2a797e5d60b19da (diff) | |
download | nginx-369145cef1971e4273dc59340689c2d96f84d18a.tar.gz nginx-369145cef1971e4273dc59340689c2d96f84d18a.zip |
nginx-0.0.3-2004-05-28-19:49:23 import; rename ngx_hunk_t to ngx_buf_t
Diffstat (limited to 'src/os/unix/ngx_aio_write_chain.c')
-rw-r--r-- | src/os/unix/ngx_aio_write_chain.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/os/unix/ngx_aio_write_chain.c b/src/os/unix/ngx_aio_write_chain.c index f5e125e4f..a872fe2e0 100644 --- a/src/os/unix/ngx_aio_write_chain.c +++ b/src/os/unix/ngx_aio_write_chain.c @@ -19,7 +19,7 @@ ngx_chain_t *ngx_aio_write_chain(ngx_connection_t *c, ngx_chain_t *in) while (cl) { - if (cl->hunk->last - cl->hunk->pos == 0) { + if (cl->buf->last - cl->buf->pos == 0) { cl = cl->next; continue; } @@ -30,15 +30,15 @@ ngx_chain_t *ngx_aio_write_chain(ngx_connection_t *c, ngx_chain_t *in) return cl; } - buf = cl->hunk->pos; + buf = cl->buf->pos; prev = buf; size = 0; - /* coalesce the neighbouring hunks */ + /* coalesce the neighbouring bufs */ - while (cl && prev == cl->hunk->pos) { - size += cl->hunk->last - cl->hunk->pos; - prev = cl->hunk->last; + while (cl && prev == cl->buf->pos) { + size += cl->buf->last - cl->buf->pos; + prev = cl->buf->last; cl = cl->next; } @@ -60,14 +60,14 @@ ngx_chain_t *ngx_aio_write_chain(ngx_connection_t *c, ngx_chain_t *in) for (cl = in; cl; cl = cl->next) { - if (sent >= cl->hunk->last - cl->hunk->pos) { - sent -= cl->hunk->last - cl->hunk->pos; - cl->hunk->pos = cl->hunk->last; + if (sent >= cl->buf->last - cl->buf->pos) { + sent -= cl->buf->last - cl->buf->pos; + cl->buf->pos = cl->buf->last; continue; } - cl->hunk->pos += sent; + cl->buf->pos += sent; break; } |