From 369145cef1971e4273dc59340689c2d96f84d18a Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Fri, 28 May 2004 15:49:23 +0000 Subject: nginx-0.0.3-2004-05-28-19:49:23 import; rename ngx_hunk_t to ngx_buf_t --- src/os/unix/ngx_files.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/os/unix/ngx_files.c') diff --git a/src/os/unix/ngx_files.c b/src/os/unix/ngx_files.c index da452e3fe..5d551ebe7 100644 --- a/src/os/unix/ngx_files.c +++ b/src/os/unix/ngx_files.c @@ -128,8 +128,8 @@ ssize_t ngx_write_chain_to_file(ngx_file_t *file, ngx_chain_t *cl, /* use pwrite() if there's the only hunk in a chain */ if (cl->next == NULL) { - return ngx_write_file(file, cl->hunk->pos, - (size_t) (cl->hunk->last - cl->hunk->pos), + return ngx_write_file(file, cl->buf->pos, + (size_t) (cl->buf->last - cl->buf->pos), offset); } @@ -139,20 +139,20 @@ ssize_t ngx_write_chain_to_file(ngx_file_t *file, ngx_chain_t *cl, ngx_init_array(io, pool, 10, sizeof(struct iovec), NGX_ERROR); - /* create the iovec and coalesce the neighbouring hunks */ + /* create the iovec and coalesce the neighbouring bufs */ while (cl) { - if (prev == cl->hunk->pos) { - iov->iov_len += cl->hunk->last - cl->hunk->pos; + if (prev == cl->buf->pos) { + iov->iov_len += cl->buf->last - cl->buf->pos; } else { ngx_test_null(iov, ngx_push_array(&io), NGX_ERROR); - iov->iov_base = (void *) cl->hunk->pos; - iov->iov_len = cl->hunk->last - cl->hunk->pos; + iov->iov_base = (void *) cl->buf->pos; + iov->iov_len = cl->buf->last - cl->buf->pos; } - size += cl->hunk->last - cl->hunk->pos; - prev = cl->hunk->last; + size += cl->buf->last - cl->buf->pos; + prev = cl->buf->last; cl = cl->next; } -- cgit v1.2.3