diff src/os/win32/ngx_wsasend_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 a472bfb778b3
children e366ba5db8f8
line wrap: on
line diff
--- a/src/os/win32/ngx_wsasend_chain.c
+++ b/src/os/win32/ngx_wsasend_chain.c
@@ -36,15 +36,15 @@ ngx_chain_t *ngx_wsasend_chain(ngx_conne
 
     for (cl = in; cl; cl = cl->next) {
 
-        if (prev == cl->hunk->pos) {
-            wsabuf->len += cl->hunk->last - cl->hunk->pos;
-            prev = cl->hunk->last;
+        if (prev == cl->buf->pos) {
+            wsabuf->len += cl->buf->last - cl->buf->pos;
+            prev = cl->buf->last;
 
         } else {
             ngx_test_null(wsabuf, ngx_push_array(&wsabufs), NGX_CHAIN_ERROR);
-            wsabuf->buf = (char *) cl->hunk->pos;
-            wsabuf->len = cl->hunk->last - cl->hunk->pos;
-            prev = cl->hunk->last;
+            wsabuf->buf = (char *) cl->buf->pos;
+            wsabuf->len = cl->buf->last - cl->buf->pos;
+            prev = cl->buf->last;
         }
     }
 
@@ -72,20 +72,20 @@ ngx_chain_t *ngx_wsasend_chain(ngx_conne
 
     for (cl = in; cl && sent > 0; cl = cl->next) {
 
-        size = cl->hunk->last - cl->hunk->pos;
+        size = cl->buf->last - cl->buf->pos;
 
         if (sent >= size) {
             sent -= size;
 
-            if (cl->hunk->type & NGX_HUNK_IN_MEMORY) {
-                cl->hunk->pos = cl->hunk->last;
+            if (ngx_buf_in_memory(cl->buf)) {
+                cl->buf->pos = cl->buf->last;
             }
 
             continue;
         }
 
-        if (cl->hunk->type & NGX_HUNK_IN_MEMORY) {
-            cl->hunk->pos += sent;
+        if (ngx_buf_in_memory(cl->buf)) {
+            cl->buf->pos += sent;
         }
 
         break;
@@ -136,16 +136,16 @@ ngx_chain_t *ngx_overlapped_wsasend_chai
 
         for (cl = in; cl; cl = cl->next) {
 
-            if (prev == cl->hunk->pos) {
-                wsabuf->len += cl->hunk->last - cl->hunk->pos;
-                prev = cl->hunk->last;
+            if (prev == cl->buf->pos) {
+                wsabuf->len += cl->buf->last - cl->buf->pos;
+                prev = cl->buf->last;
  
             } else {
                 ngx_test_null(wsabuf, ngx_push_array(&wsabufs),
                               NGX_CHAIN_ERROR);
-                wsabuf->buf = (char *) cl->hunk->pos;
-                wsabuf->len = cl->hunk->last - cl->hunk->pos;
-                prev = cl->hunk->last;
+                wsabuf->buf = (char *) cl->buf->pos;
+                wsabuf->len = cl->buf->last - cl->buf->pos;
+                prev = cl->buf->last;
             }
         }
 
@@ -213,20 +213,20 @@ ngx_chain_t *ngx_overlapped_wsasend_chai
 
     for (cl = in; cl && sent > 0; cl = cl->next) {
 
-        size = cl->hunk->last - cl->hunk->pos;
+        size = cl->buf->last - cl->buf->pos;
 
         if (sent >= size) {
             sent -= size;
 
-            if (cl->hunk->type & NGX_HUNK_IN_MEMORY) {
-                cl->hunk->pos = cl->hunk->last;
+            if (ngx_buf_in_memory(cl->buf)) {
+                cl->buf->pos = cl->buf->last;
             }
 
             continue;
         }
 
-        if (cl->hunk->type & NGX_HUNK_IN_MEMORY) {
-            cl->hunk->pos += sent;
+        if (ngx_buf_in_memory(cl->buf)) {
+            cl->buf->pos += sent;
         }
 
         break;