Mercurial > hg > nginx
comparison src/core/ngx_hunk.c @ 134:d57c6835225c
nginx-0.0.1-2003-09-26-09:45:21 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Fri, 26 Sep 2003 05:45:21 +0000 |
parents | 949f45d1589a |
children | e29909bd9b8a |
comparison
equal
deleted
inserted
replaced
133:b27548f540ad | 134:d57c6835225c |
---|---|
97 | 97 |
98 return h; | 98 return h; |
99 } | 99 } |
100 | 100 |
101 | 101 |
102 int ngx_chain_add_copy(ngx_pool_t *pool, ngx_chain_t **ch, ngx_chain_t *in) | |
103 { | |
104 ngx_chain_t *ce, **le; | |
105 | |
106 le = ch; | |
107 | |
108 for (ce = *ch; ce; ce = ce->next) { | |
109 le = &ce->next; | |
110 } | |
111 | |
112 while (in) { | |
113 ngx_test_null(ce, ngx_alloc_chain_entry(pool), NGX_ERROR); | |
114 | |
115 ce->hunk = in->hunk; | |
116 ce->next = NULL; | |
117 *le = ce; | |
118 le = &ce->next; | |
119 in = in->next; | |
120 } | |
121 | |
122 return NGX_OK; | |
123 } | |
124 | |
125 | |
102 void ngx_chain_update_chains(ngx_chain_t **free, ngx_chain_t **busy, | 126 void ngx_chain_update_chains(ngx_chain_t **free, ngx_chain_t **busy, |
103 ngx_chain_t **out) | 127 ngx_chain_t **out) |
104 { | 128 { |
105 ngx_chain_t *te; | 129 ngx_chain_t *te; |
106 | 130 |