aboutsummaryrefslogtreecommitdiff
path: root/src/core/ngx_hunk.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2003-09-26 05:45:21 +0000
committerIgor Sysoev <igor@sysoev.ru>2003-09-26 05:45:21 +0000
commit02f0132392913bd632d2616a0c0ab5391c2cfc6d (patch)
tree98748e0ae20789088f409b611736a2ba7c3a6bc2 /src/core/ngx_hunk.c
parent14827c7c6f83eaf74dc87d2132c0125f0d5d3f8e (diff)
downloadnginx-02f0132392913bd632d2616a0c0ab5391c2cfc6d.tar.gz
nginx-02f0132392913bd632d2616a0c0ab5391c2cfc6d.zip
nginx-0.0.1-2003-09-26-09:45:21 import
Diffstat (limited to 'src/core/ngx_hunk.c')
-rw-r--r--src/core/ngx_hunk.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/core/ngx_hunk.c b/src/core/ngx_hunk.c
index 29b88772a..1441b7c08 100644
--- a/src/core/ngx_hunk.c
+++ b/src/core/ngx_hunk.c
@@ -99,6 +99,30 @@ ngx_hunk_t *ngx_create_hunk_after(ngx_pool_t *pool, ngx_hunk_t *hunk, int size)
}
+int ngx_chain_add_copy(ngx_pool_t *pool, ngx_chain_t **ch, ngx_chain_t *in)
+{
+ ngx_chain_t *ce, **le;
+
+ le = ch;
+
+ for (ce = *ch; ce; ce = ce->next) {
+ le = &ce->next;
+ }
+
+ while (in) {
+ ngx_test_null(ce, ngx_alloc_chain_entry(pool), NGX_ERROR);
+
+ ce->hunk = in->hunk;
+ ce->next = NULL;
+ *le = ce;
+ le = &ce->next;
+ in = in->next;
+ }
+
+ return NGX_OK;
+}
+
+
void ngx_chain_update_chains(ngx_chain_t **free, ngx_chain_t **busy,
ngx_chain_t **out)
{