diff src/os/unix/ngx_aio_write_chain.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 4a3f18406832
children 7650aea1816f
line wrap: on
line diff
--- 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_con
 
     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_con
             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_con
 
         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;
         }