diff src/os/unix/ngx_files.c @ 343:6bdf858bff8c

nginx-0.0.3-2004-05-28-19:49:23 import; rename ngx_hunk_t to ngx_buf_t
author Igor Sysoev <igor@sysoev.ru>
date Fri, 28 May 2004 15:49:23 +0000
parents 00c5660d2707
children e366ba5db8f8
line wrap: on
line diff
--- 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
     /* 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
 
     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;
     }