Mercurial > hg > nginx-quic
comparison src/os/unix/ngx_linux_sendfile_chain.c @ 589:d4e858a5751a release-0.3.16
nginx-0.3.16-RELEASE import
*) Feature: the ngx_http_map_module.
*) Feature: the "types_hash_max_size" and "types_hash_bucket_size"
directives.
*) Feature: the "ssi_value_length" directive.
*) Feature: the "worker_rlimit_core" directive.
*) Workaround: the connection number in logs was always 1 if nginx was
built by the icc 8.1 or 9.0 compilers with optimization for
Pentium 4.
*) Bugfix: the "config timefmt" SSI command set incorrect time format.
*) Bugfix: nginx did not close connection to IMAP/POP3 backend for the
SSL connections; the bug had appeared in 0.3.13.
Thanks to Rob Mueller.
*) Bugfix: segmentation fault may occurred in at SSL shutdown; the bug
had appeared in 0.3.13.
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Fri, 16 Dec 2005 15:07:08 +0000 |
parents | 401de5a43ba5 |
children | 9262f520ce21 |
comparison
equal
deleted
inserted
replaced
588:0a2c30f516e6 | 589:d4e858a5751a |
---|---|
24 | 24 |
25 | 25 |
26 ngx_chain_t * | 26 ngx_chain_t * |
27 ngx_linux_sendfile_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit) | 27 ngx_linux_sendfile_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit) |
28 { | 28 { |
29 int rc, tcp_nodelay; | 29 int rc, tcp_nodelay; |
30 u_char *prev; | 30 off_t size, send, prev_send, aligned, sent, fprev; |
31 off_t size, send, prev_send, aligned, sent, fprev; | 31 u_char *prev; |
32 size_t file_size; | 32 size_t file_size; |
33 ngx_uint_t eintr, complete; | 33 ngx_err_t err; |
34 ngx_err_t err; | 34 ngx_buf_t *file; |
35 ngx_buf_t *file; | 35 ngx_uint_t eintr, complete; |
36 ngx_array_t header; | 36 ngx_array_t header; |
37 ngx_event_t *wev; | 37 ngx_event_t *wev; |
38 ngx_chain_t *cl; | 38 ngx_chain_t *cl; |
39 struct iovec *iov, headers[NGX_HEADERS]; | 39 struct iovec *iov, headers[NGX_HEADERS]; |
40 #if (NGX_HAVE_SENDFILE64) | 40 #if (NGX_HAVE_SENDFILE64) |
41 off_t offset; | 41 off_t offset; |
42 #else | 42 #else |
43 int32_t offset; | 43 int32_t offset; |
44 #endif | 44 #endif |
45 | 45 |
46 wev = c->write; | 46 wev = c->write; |
47 | 47 |
48 if (!wev->ready) { | 48 if (!wev->ready) { |
231 && file->file->fd == cl->buf->file->fd | 231 && file->file->fd == cl->buf->file->fd |
232 && fprev == cl->buf->file_pos); | 232 && fprev == cl->buf->file_pos); |
233 } | 233 } |
234 | 234 |
235 if (file) { | 235 if (file) { |
236 #if 1 | |
237 if (file_size == 0) { | |
238 ngx_debug_point(); | |
239 return NGX_CHAIN_ERROR; | |
240 } | |
241 #endif | |
236 #if (NGX_HAVE_SENDFILE64) | 242 #if (NGX_HAVE_SENDFILE64) |
237 offset = file->file_pos; | 243 offset = file->file_pos; |
238 #else | 244 #else |
239 offset = (int32_t) file->file_pos; | 245 offset = (int32_t) file->file_pos; |
240 #endif | 246 #endif |