comparison src/os/win32/ngx_wsarecv_chain.c @ 343:6bdf858bff8c

nginx-0.0.3-2004-05-28-19:49:23 import; rename ngx_hunk_t to ngx_buf_t
author Igor Sysoev <igor@sysoev.ru>
date Fri, 28 May 2004 15:49:23 +0000
parents a472bfb778b3
children da8c5707af39
comparison
equal deleted inserted replaced
342:0ee0642af5f1 343:6bdf858bff8c
21 size = 0; 21 size = 0;
22 bytes = 0; 22 bytes = 0;
23 23
24 ngx_init_array(io, c->pool, 10, sizeof(WSABUF), NGX_ERROR); 24 ngx_init_array(io, c->pool, 10, sizeof(WSABUF), NGX_ERROR);
25 25
26 /* coalesce the neighbouring hunks */ 26 /* coalesce the neighbouring bufs */
27 27
28 while (chain) { 28 while (chain) {
29 if (prev == chain->hunk->last) { 29 if (prev == chain->buf->last) {
30 wsabuf->len += chain->hunk->end - chain->hunk->last; 30 wsabuf->len += chain->buf->end - chain->buf->last;
31 31
32 } else { 32 } else {
33 ngx_test_null(wsabuf, ngx_push_array(&io), NGX_ERROR); 33 ngx_test_null(wsabuf, ngx_push_array(&io), NGX_ERROR);
34 wsabuf->buf = (char *) chain->hunk->last; 34 wsabuf->buf = (char *) chain->buf->last;
35 wsabuf->len = chain->hunk->end - chain->hunk->last; 35 wsabuf->len = chain->buf->end - chain->buf->last;
36 } 36 }
37 37
38 size += chain->hunk->end - chain->hunk->last; 38 size += chain->buf->end - chain->buf->last;
39 prev = chain->hunk->end; 39 prev = chain->buf->end;
40 chain = chain->next; 40 chain = chain->next;
41 } 41 }
42 42
43 ngx_log_debug2(NGX_LOG_DEBUG_EVENT, c->log, 0, 43 ngx_log_debug2(NGX_LOG_DEBUG_EVENT, c->log, 0,
44 "WSARecv: %d:%d", io.nelts, wsabuf->len); 44 "WSARecv: %d:%d", io.nelts, wsabuf->len);