comparison 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
comparison
equal deleted inserted replaced
342:0ee0642af5f1 343:6bdf858bff8c
90 /* find the size, the flush point and the last link of the saved chain */ 90 /* find the size, the flush point and the last link of the saved chain */
91 91
92 for (cl = ctx->out; cl; cl = cl->next) { 92 for (cl = ctx->out; cl; cl = cl->next) {
93 ll = &cl->next; 93 ll = &cl->next;
94 94
95 size += ngx_hunk_size(cl->hunk); 95 size += ngx_buf_size(cl->buf);
96 96
97 if (cl->hunk->type & (NGX_HUNK_FLUSH|NGX_HUNK_RECYCLED)) { 97 if (cl->buf->flush || cl->buf->recycled) {
98 flush = size; 98 flush = size;
99 } 99 }
100 100
101 if (cl->hunk->type & NGX_HUNK_LAST) { 101 if (cl->buf->last_buf) {
102 last = 1; 102 last = 1;
103 } 103 }
104 } 104 }
105 105
106 /* add the new chain to the existent one */ 106 /* add the new chain to the existent one */
107 107
108 for (ln = in; ln; ln = ln->next) { 108 for (ln = in; ln; ln = ln->next) {
109 ngx_alloc_link_and_set_hunk(cl, ln->hunk, r->pool, NGX_ERROR); 109 ngx_alloc_link_and_set_buf(cl, ln->buf, r->pool, NGX_ERROR);
110 *ll = cl; 110 *ll = cl;
111 ll = &cl->next; 111 ll = &cl->next;
112 112
113 size += ngx_hunk_size(cl->hunk); 113 size += ngx_buf_size(cl->buf);
114 114
115 if (cl->hunk->type & (NGX_HUNK_FLUSH|NGX_HUNK_RECYCLED)) { 115 if (cl->buf->flush || cl->buf->recycled) {
116 flush = size; 116 flush = size;
117 } 117 }
118 118
119 if (cl->hunk->type & NGX_HUNK_LAST) { 119 if (cl->buf->last_buf) {
120 last = 1; 120 last = 1;
121 } 121 }
122 } 122 }
123 123
124 ngx_log_debug3(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, 124 ngx_log_debug3(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,