Mercurial > hg > nginx
comparison src/os/unix/ngx_linux_sendfile_chain.c @ 1182:df449f4a8032
fix sendfile on 64-bit Linux and limit_rate on all 64-bit platforms
for 2G+ files
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 23 Apr 2007 21:32:13 +0000 |
parents | 8e446a2daf48 |
children | f4d6c84c69f9 |
comparison
equal
deleted
inserted
replaced
1181:ea5ecb1aae88 | 1182:df449f4a8032 |
---|---|
221 | 221 |
222 if (send + size > limit) { | 222 if (send + size > limit) { |
223 size = limit - send; | 223 size = limit - send; |
224 | 224 |
225 aligned = (cl->buf->file_pos + size + ngx_pagesize - 1) | 225 aligned = (cl->buf->file_pos + size + ngx_pagesize - 1) |
226 & ~(ngx_pagesize - 1); | 226 & ~((off_t) ngx_pagesize - 1); |
227 | 227 |
228 if (aligned <= cl->buf->file_last) { | 228 if (aligned <= cl->buf->file_last) { |
229 size = aligned - cl->buf->file_pos; | 229 size = aligned - cl->buf->file_pos; |
230 } | 230 } |
231 } | 231 } |