diff src/http/ngx_http_write_filter.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 be40e9893a19
children e366ba5db8f8
line wrap: on
line diff
--- a/src/http/ngx_http_write_filter.c
+++ b/src/http/ngx_http_write_filter.c
@@ -92,13 +92,13 @@ int ngx_http_write_filter(ngx_http_reque
     for (cl = ctx->out; cl; cl = cl->next) {
         ll = &cl->next;
 
-        size += ngx_hunk_size(cl->hunk);
+        size += ngx_buf_size(cl->buf);
 
-        if (cl->hunk->type & (NGX_HUNK_FLUSH|NGX_HUNK_RECYCLED)) {
+        if (cl->buf->flush || cl->buf->recycled) {
             flush = size;
         }
 
-        if (cl->hunk->type & NGX_HUNK_LAST) {
+        if (cl->buf->last_buf) {
             last = 1;
         }
     }
@@ -106,17 +106,17 @@ int ngx_http_write_filter(ngx_http_reque
     /* add the new chain to the existent one */
 
     for (ln = in; ln; ln = ln->next) {
-        ngx_alloc_link_and_set_hunk(cl, ln->hunk, r->pool, NGX_ERROR);
+        ngx_alloc_link_and_set_buf(cl, ln->buf, r->pool, NGX_ERROR);
         *ll = cl;
         ll = &cl->next;
 
-        size += ngx_hunk_size(cl->hunk);
+        size += ngx_buf_size(cl->buf);
 
-        if (cl->hunk->type & (NGX_HUNK_FLUSH|NGX_HUNK_RECYCLED)) {
+        if (cl->buf->flush || cl->buf->recycled) {
             flush = size;
         }
 
-        if (cl->hunk->type & NGX_HUNK_LAST) {
+        if (cl->buf->last_buf) {
             last = 1;
         }
     }