diff options
author | Igor Sysoev <igor@sysoev.ru> | 2004-06-01 06:04:46 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2004-06-01 06:04:46 +0000 |
commit | 67f450d7bc2b847f07ad302fa3fd6fa46da784f0 (patch) | |
tree | ad432c07b62f9145f78ba569e9a1ed51a3d41e17 /src/os/unix/ngx_solaris_sendfilev_chain.c | |
parent | 369145cef1971e4273dc59340689c2d96f84d18a (diff) | |
download | nginx-67f450d7bc2b847f07ad302fa3fd6fa46da784f0.tar.gz nginx-67f450d7bc2b847f07ad302fa3fd6fa46da784f0.zip |
nginx-0.0.3-2004-06-01-10:04:46 import
Diffstat (limited to 'src/os/unix/ngx_solaris_sendfilev_chain.c')
-rw-r--r-- | src/os/unix/ngx_solaris_sendfilev_chain.c | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/src/os/unix/ngx_solaris_sendfilev_chain.c b/src/os/unix/ngx_solaris_sendfilev_chain.c index 964027f65..352c1623d 100644 --- a/src/os/unix/ngx_solaris_sendfilev_chain.c +++ b/src/os/unix/ngx_solaris_sendfilev_chain.c @@ -43,42 +43,42 @@ ngx_chain_t *ngx_solaris_sendfilev_chain(ngx_connection_t *c, ngx_chain_t *in) /* create the sendfilevec and coalesce the neighbouring bufs */ for (cl = in; cl && vec.nelts < IOV_MAX; cl = cl->next) { - if (ngx_hunk_special(cl->hunk)) { + if (ngx_buf_special(cl->buf)) { continue; } - if (ngx_hunk_in_memory_only(cl->hunk)) { + if (ngx_buf_in_memory_only(cl->buf)) { fd = SFV_FD_SELF; - if (prev == cl->hunk->pos) { - sfv->sfv_len += cl->hunk->last - cl->hunk->pos; + if (prev == cl->buf->pos) { + sfv->sfv_len += cl->buf->last - cl->buf->pos; } else { ngx_test_null(sfv, ngx_push_array(&vec), NGX_CHAIN_ERROR); sfv->sfv_fd = SFV_FD_SELF; sfv->sfv_flag = 0; - sfv->sfv_off = (off_t) (uintptr_t) cl->hunk->pos; - sfv->sfv_len = cl->hunk->last - cl->hunk->pos; + sfv->sfv_off = (off_t) (uintptr_t) cl->buf->pos; + sfv->sfv_len = cl->buf->last - cl->buf->pos; } - prev = cl->hunk->last; + prev = cl->buf->last; } else { prev = NULL; - if (fd == cl->hunk->file->fd && fprev == cl->hunk->file_pos) { - sfv->sfv_len += cl->hunk->file_last - cl->hunk->file_pos; + if (fd == cl->buf->file->fd && fprev == cl->buf->file_pos) { + sfv->sfv_len += cl->buf->file_last - cl->buf->file_pos; } else { ngx_test_null(sfv, ngx_push_array(&vec), NGX_CHAIN_ERROR); - fd = cl->hunk->file->fd; + fd = cl->buf->file->fd; sfv->sfv_fd = fd; sfv->sfv_flag = 0; - sfv->sfv_off = cl->hunk->file_pos; - sfv->sfv_len = cl->hunk->file_last - cl->hunk->file_pos; + sfv->sfv_off = cl->buf->file_pos; + sfv->sfv_len = cl->buf->file_last - cl->buf->file_pos; } - fprev = cl->hunk->file_last; + fprev = cl->buf->file_last; } } @@ -117,7 +117,7 @@ ngx_chain_t *ngx_solaris_sendfilev_chain(ngx_connection_t *c, ngx_chain_t *in) for (cl = in; cl; cl = cl->next) { - if (ngx_hunk_special(cl->hunk)) { + if (ngx_buf_special(cl->buf)) { continue; } @@ -125,28 +125,28 @@ ngx_chain_t *ngx_solaris_sendfilev_chain(ngx_connection_t *c, ngx_chain_t *in) break; } - size = ngx_hunk_size(cl->hunk); + size = ngx_buf_size(cl->buf); if (sent >= size) { sent -= size; - if (cl->hunk->type & NGX_HUNK_IN_MEMORY) { - cl->hunk->pos = cl->hunk->last; + if (ngx_buf_in_memory(cl->buf)) { + cl->buf->pos = cl->buf->last; } - if (cl->hunk->type & NGX_HUNK_FILE) { - cl->hunk->file_pos = cl->hunk->file_last; + if (cl->buf->in_file) { + cl->buf->file_pos = cl->buf->file_last; } continue; } - if (cl->hunk->type & NGX_HUNK_IN_MEMORY) { - cl->hunk->pos += sent; + if (ngx_buf_in_memory(cl->buf)) { + cl->buf->pos += sent; } - if (cl->hunk->type & NGX_HUNK_FILE) { - cl->hunk->file_pos += sent; + if (cl->buf->in_file) { + cl->buf->file_pos += sent; } break; |