Mercurial > hg > nginx
diff src/os/unix/ngx_freebsd_sendfile_chain.c @ 262:8c5bdde0d9f0
nginx-0.0.2-2004-02-18-18:45:21 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Wed, 18 Feb 2004 15:45:21 +0000 |
parents | b6793bc5034b |
children | cd009bf7400d |
line wrap: on
line diff
--- a/src/os/unix/ngx_freebsd_sendfile_chain.c +++ b/src/os/unix/ngx_freebsd_sendfile_chain.c @@ -73,7 +73,7 @@ ngx_chain_t *ngx_freebsd_sendfile_chain( prev = NULL; iov = NULL; - for (cl = in; cl; cl = cl->next) { + for (cl = in; cl && header.nelts < IOV_MAX; cl = cl->next) { if (ngx_hunk_special(cl->hunk)) { continue; } @@ -123,7 +123,7 @@ ngx_chain_t *ngx_freebsd_sendfile_chain( prev = NULL; iov = NULL; - for ( /* void */; cl; cl = cl->next) { + for ( /* void */; cl && trailer.nelts < IOV_MAX; cl = cl->next) { if (ngx_hunk_special(cl->hunk)) { continue; }