summaryrefslogtreecommitdiffhomepage
path: root/src/os/win32/ngx_wsasend_chain.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/os/win32/ngx_wsasend_chain.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/src/os/win32/ngx_wsasend_chain.c b/src/os/win32/ngx_wsasend_chain.c
index 198e2b4c8..46e03da65 100644
--- a/src/os/win32/ngx_wsasend_chain.c
+++ b/src/os/win32/ngx_wsasend_chain.c
@@ -36,15 +36,15 @@ ngx_chain_t *ngx_wsasend_chain(ngx_connection_t *c, ngx_chain_t *in)
for (cl = in; cl; cl = cl->next) {
- if (prev == cl->hunk->pos) {
- wsabuf->len += cl->hunk->last - cl->hunk->pos;
- prev = cl->hunk->last;
+ if (prev == cl->buf->pos) {
+ wsabuf->len += cl->buf->last - cl->buf->pos;
+ prev = cl->buf->last;
} else {
ngx_test_null(wsabuf, ngx_push_array(&wsabufs), NGX_CHAIN_ERROR);
- wsabuf->buf = (char *) cl->hunk->pos;
- wsabuf->len = cl->hunk->last - cl->hunk->pos;
- prev = cl->hunk->last;
+ wsabuf->buf = (char *) cl->buf->pos;
+ wsabuf->len = cl->buf->last - cl->buf->pos;
+ prev = cl->buf->last;
}
}
@@ -72,20 +72,20 @@ ngx_chain_t *ngx_wsasend_chain(ngx_connection_t *c, ngx_chain_t *in)
for (cl = in; cl && sent > 0; cl = cl->next) {
- size = cl->hunk->last - cl->hunk->pos;
+ size = cl->buf->last - cl->buf->pos;
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;
}
continue;
}
- if (cl->hunk->type & NGX_HUNK_IN_MEMORY) {
- cl->hunk->pos += sent;
+ if (ngx_buf_in_memory(cl->buf)) {
+ cl->buf->pos += sent;
}
break;
@@ -136,16 +136,16 @@ ngx_chain_t *ngx_overlapped_wsasend_chain(ngx_connection_t *c, ngx_chain_t *in)
for (cl = in; cl; cl = cl->next) {
- if (prev == cl->hunk->pos) {
- wsabuf->len += cl->hunk->last - cl->hunk->pos;
- prev = cl->hunk->last;
+ if (prev == cl->buf->pos) {
+ wsabuf->len += cl->buf->last - cl->buf->pos;
+ prev = cl->buf->last;
} else {
ngx_test_null(wsabuf, ngx_push_array(&wsabufs),
NGX_CHAIN_ERROR);
- wsabuf->buf = (char *) cl->hunk->pos;
- wsabuf->len = cl->hunk->last - cl->hunk->pos;
- prev = cl->hunk->last;
+ wsabuf->buf = (char *) cl->buf->pos;
+ wsabuf->len = cl->buf->last - cl->buf->pos;
+ prev = cl->buf->last;
}
}
@@ -213,20 +213,20 @@ ngx_chain_t *ngx_overlapped_wsasend_chain(ngx_connection_t *c, ngx_chain_t *in)
for (cl = in; cl && sent > 0; cl = cl->next) {
- size = cl->hunk->last - cl->hunk->pos;
+ size = cl->buf->last - cl->buf->pos;
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;
}
continue;
}
- if (cl->hunk->type & NGX_HUNK_IN_MEMORY) {
- cl->hunk->pos += sent;
+ if (ngx_buf_in_memory(cl->buf)) {
+ cl->buf->pos += sent;
}
break;