Mercurial > hg > nginx
comparison src/os/win32/ngx_wsasend_chain.c @ 5851:150df089fe47
Removed the "complete" variable from various send chain functions.
It was made redundant by the previous change, since the "sent" variable
is no longer modified.
author | Valentin Bartenev <vbart@nginx.com> |
---|---|
date | Wed, 13 Aug 2014 15:11:45 +0400 |
parents | f9c83484d9ce |
children | a6e83ac70af9 |
comparison
equal
deleted
inserted
replaced
5850:f9c83484d9ce | 5851:150df089fe47 |
---|---|
17 ngx_wsasend_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit) | 17 ngx_wsasend_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit) |
18 { | 18 { |
19 int rc; | 19 int rc; |
20 u_char *prev; | 20 u_char *prev; |
21 u_long size, sent, send, prev_send; | 21 u_long size, sent, send, prev_send; |
22 ngx_uint_t complete; | |
23 ngx_err_t err; | 22 ngx_err_t err; |
24 ngx_event_t *wev; | 23 ngx_event_t *wev; |
25 ngx_array_t vec; | 24 ngx_array_t vec; |
26 ngx_chain_t *cl; | 25 ngx_chain_t *cl; |
27 LPWSABUF wsabuf; | 26 LPWSABUF wsabuf; |
38 if (limit == 0 || limit > NGX_MAX_UINT32_VALUE - ngx_pagesize) { | 37 if (limit == 0 || limit > NGX_MAX_UINT32_VALUE - ngx_pagesize) { |
39 limit = NGX_MAX_UINT32_VALUE - ngx_pagesize; | 38 limit = NGX_MAX_UINT32_VALUE - ngx_pagesize; |
40 } | 39 } |
41 | 40 |
42 send = 0; | 41 send = 0; |
43 complete = 0; | |
44 | 42 |
45 /* | 43 /* |
46 * WSABUFs must be 4-byte aligned otherwise | 44 * WSABUFs must be 4-byte aligned otherwise |
47 * WSASend() will return undocumented WSAEINVAL error. | 45 * WSASend() will return undocumented WSAEINVAL error. |
48 */ | 46 */ |
111 } | 109 } |
112 | 110 |
113 ngx_log_debug2(NGX_LOG_DEBUG_EVENT, c->log, 0, | 111 ngx_log_debug2(NGX_LOG_DEBUG_EVENT, c->log, 0, |
114 "WSASend: fd:%d, s:%ul", c->fd, sent); | 112 "WSASend: fd:%d, s:%ul", c->fd, sent); |
115 | 113 |
116 if (send - prev_send == sent) { | |
117 complete = 1; | |
118 } | |
119 | |
120 c->sent += sent; | 114 c->sent += sent; |
121 | 115 |
122 cl = ngx_handle_sent_chain(in, sent); | 116 cl = ngx_handle_sent_chain(in, sent); |
123 | 117 |
124 if (!complete) { | 118 if (send - prev_send != sent) { |
125 wev->ready = 0; | 119 wev->ready = 0; |
126 return cl; | 120 return cl; |
127 } | 121 } |
128 | 122 |
129 if (send >= limit || cl == NULL) { | 123 if (send >= limit || cl == NULL) { |