diff options
author | Igor Sysoev <igor@sysoev.ru> | 2004-05-28 19:49:23 +0400 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2004-05-28 19:49:23 +0400 |
commit | 369145cef1971e4273dc59340689c2d96f84d18a (patch) | |
tree | 55f59267d9ada5160ad74168bf5721ce5b3653ff /src/os/unix/ngx_readv_chain.c | |
parent | 87a7d1c44917e352e336c859c2a797e5d60b19da (diff) |
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_readv_chain.c')
-rw-r--r-- | src/os/unix/ngx_readv_chain.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/os/unix/ngx_readv_chain.c b/src/os/unix/ngx_readv_chain.c index 86f774a0d..ed66ca027 100644 --- a/src/os/unix/ngx_readv_chain.c +++ b/src/os/unix/ngx_readv_chain.c @@ -10,10 +10,10 @@ ssize_t ngx_readv_chain(ngx_connection_t *c, ngx_chain_t *chain) { u_char *prev; ssize_t n, size; - struct iovec *iov; ngx_err_t err; ngx_array_t io; ngx_event_t *rev; + struct iovec *iov; rev = c->read; @@ -50,20 +50,20 @@ ssize_t ngx_readv_chain(ngx_connection_t *c, ngx_chain_t *chain) ngx_init_array(io, c->pool, 10, sizeof(struct iovec), NGX_ERROR); - /* coalesce the neighbouring hunks */ + /* coalesce the neighbouring bufs */ while (chain) { - if (prev == chain->hunk->last) { - iov->iov_len += chain->hunk->end - chain->hunk->last; + if (prev == chain->buf->last) { + iov->iov_len += chain->buf->end - chain->buf->last; } else { ngx_test_null(iov, ngx_push_array(&io), NGX_ERROR); - iov->iov_base = (void *) chain->hunk->last; - iov->iov_len = chain->hunk->end - chain->hunk->last; + iov->iov_base = (void *) chain->buf->last; + iov->iov_len = chain->buf->end - chain->buf->last; } - size += chain->hunk->end - chain->hunk->last; - prev = chain->hunk->end; + size += chain->buf->end - chain->buf->last; + prev = chain->buf->end; chain = chain->next; } @@ -137,10 +137,10 @@ ssize_t ngx_readv_chain(ngx_connection_t *c, ngx_chain_t *chain) { u_char *prev; ssize_t n, size; - struct iovec *iov; ngx_err_t err; ngx_array_t io; ngx_event_t *rev; + struct iovec *iov; prev = NULL; iov = NULL; @@ -148,20 +148,20 @@ ssize_t ngx_readv_chain(ngx_connection_t *c, ngx_chain_t *chain) ngx_init_array(io, c->pool, 10, sizeof(struct iovec), NGX_ERROR); - /* coalesce the neighbouring hunks */ + /* coalesce the neighbouring bufs */ while (chain) { - if (prev == chain->hunk->last) { - iov->iov_len += chain->hunk->end - chain->hunk->last; + if (prev == chain->buf->last) { + iov->iov_len += chain->buf->end - chain->buf->last; } else { ngx_test_null(iov, ngx_push_array(&io), NGX_ERROR); - iov->iov_base = chain->hunk->last; - iov->iov_len = chain->hunk->end - chain->hunk->last; + iov->iov_base = chain->buf->last; + iov->iov_len = chain->buf->end - chain->buf->last; } - size += chain->hunk->end - chain->hunk->last; - prev = chain->hunk->end; + size += chain->buf->end - chain->buf->last; + prev = chain->buf->end; chain = chain->next; } |