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_files.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_files.c')
-rw-r--r-- | src/os/unix/ngx_files.c | 18 |
1 files changed, 9 insertions, 9 deletions
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; } |