Mercurial > hg > nginx
comparison src/os/unix/ngx_linux_sendfile_chain.c @ 290:87e73f067470
nginx-0.0.2-2004-03-16-10:10:12 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Tue, 16 Mar 2004 07:10:12 +0000 |
parents | d4e65d74db9f |
children | 6bdf858bff8c |
comparison
equal
deleted
inserted
replaced
289:0750faf8d7e3 | 290:87e73f067470 |
---|---|
20 | 20 |
21 | 21 |
22 ngx_chain_t *ngx_linux_sendfile_chain(ngx_connection_t *c, ngx_chain_t *in) | 22 ngx_chain_t *ngx_linux_sendfile_chain(ngx_connection_t *c, ngx_chain_t *in) |
23 { | 23 { |
24 int rc; | 24 int rc; |
25 char *prev; | 25 u_char *prev; |
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; |
69 if (prev == cl->hunk->pos) { | 69 if (prev == cl->hunk->pos) { |
70 iov->iov_len += cl->hunk->last - cl->hunk->pos; | 70 iov->iov_len += cl->hunk->last - cl->hunk->pos; |
71 | 71 |
72 } else { | 72 } else { |
73 ngx_test_null(iov, ngx_push_array(&header), NGX_CHAIN_ERROR); | 73 ngx_test_null(iov, ngx_push_array(&header), NGX_CHAIN_ERROR); |
74 iov->iov_base = cl->hunk->pos; | 74 iov->iov_base = (void *) cl->hunk->pos; |
75 iov->iov_len = cl->hunk->last - cl->hunk->pos; | 75 iov->iov_len = cl->hunk->last - cl->hunk->pos; |
76 } | 76 } |
77 | 77 |
78 prev = cl->hunk->last; | 78 prev = cl->hunk->last; |
79 } | 79 } |