Mercurial > hg > nginx-quic
comparison src/os/unix/ngx_freebsd_write_chain.c @ 88:674d333f4296
nginx-0.0.1-2003-05-14-21:13:13 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Wed, 14 May 2003 17:13:13 +0000 |
parents | 17ab1af8c3dd |
children | 29bf798b583f |
comparison
equal
deleted
inserted
replaced
87:5f6d848dcbef | 88:674d333f4296 |
---|---|
7 #include <ngx_array.h> | 7 #include <ngx_array.h> |
8 #include <ngx_hunk.h> | 8 #include <ngx_hunk.h> |
9 #include <ngx_connection.h> | 9 #include <ngx_connection.h> |
10 #include <ngx_sendv.h> | 10 #include <ngx_sendv.h> |
11 #include <ngx_sendfile.h> | 11 #include <ngx_sendfile.h> |
12 #include <ngx_freebsd_init.h> | |
12 | 13 |
13 | 14 |
14 ngx_chain_t *ngx_freebsd_write_chain(ngx_connection_t *c, ngx_chain_t *in) | 15 ngx_chain_t *ngx_freebsd_write_chain(ngx_connection_t *c, ngx_chain_t *in) |
15 { | 16 { |
16 int rc; | 17 int rc; |
48 iov->iov_base = ce->hunk->pos; | 49 iov->iov_base = ce->hunk->pos; |
49 iov->iov_len = ce->hunk->last - ce->hunk->pos; | 50 iov->iov_len = ce->hunk->last - ce->hunk->pos; |
50 prev = ce->hunk->last; | 51 prev = ce->hunk->last; |
51 } | 52 } |
52 | 53 |
53 #if (HAVE_FREEBSD_SENDFILE_NBYTES_BUG) | 54 if (ngx_freebsd_sendfile_nbytes_bug) { |
54 hsize += ce->hunk->last - ce->hunk->pos; | 55 hsize += ce->hunk->last - ce->hunk->pos; |
55 #endif | 56 } |
56 ce = ce->next; | 57 ce = ce->next; |
57 } | 58 } |
58 } | 59 } |
59 | 60 |
60 /* TODO: coalesce the neighbouring file hunks */ | 61 /* TODO: coalesce the neighbouring file hunks */ |