comparison src/os/unix/ngx_linux_sendfile_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 87e73f067470
children e366ba5db8f8
comparison
equal deleted inserted replaced
342:0ee0642af5f1 343:6bdf858bff8c
26 off_t fprev; 26 off_t fprev;
27 size_t size, fsize, sent; 27 size_t size, fsize, sent;
28 ngx_int_t eintr; 28 ngx_int_t eintr;
29 struct iovec *iov; 29 struct iovec *iov;
30 ngx_err_t err; 30 ngx_err_t err;
31 ngx_hunk_t *file; 31 ngx_buf_t *file;
32 ngx_array_t header; 32 ngx_array_t header;
33 ngx_event_t *wev; 33 ngx_event_t *wev;
34 ngx_chain_t *cl, *tail; 34 ngx_chain_t *cl, *tail;
35 #if (HAVE_SENDFILE64) 35 #if (HAVE_SENDFILE64)
36 off_t offset; 36 off_t offset;
53 NGX_CHAIN_ERROR); 53 NGX_CHAIN_ERROR);
54 54
55 prev = NULL; 55 prev = NULL;
56 iov = NULL; 56 iov = NULL;
57 57
58 /* create the iovec and coalesce the neighbouring hunks */ 58 /* create the iovec and coalesce the neighbouring bufs */
59 59
60 for (cl = in; cl && header.nelts < IOV_MAX; cl = cl->next) { 60 for (cl = in; cl && header.nelts < IOV_MAX; cl = cl->next) {
61 if (ngx_hunk_special(cl->hunk)) { 61 if (ngx_hunk_special(cl->hunk)) {
62 continue; 62 continue;
63 } 63 }
129 cl = cl->next; 129 cl = cl->next;
130 } 130 }
131 } 131 }
132 132
133 /* 133 /*
134 * the tail is the rest of the chain that exceeded 134 * the tail is the rest of the chain that exceedes
135 * a single sendfile() capability 135 * a single sendfile() capability
136 */ 136 */
137 137
138 tail = cl; 138 tail = cl;
139 139