Mercurial > hg > nginx
comparison src/os/unix/ngx_darwin_sendfile_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 | b63e829621ab |
comparison
equal
deleted
inserted
replaced
5850:f9c83484d9ce | 5851:150df089fe47 |
---|---|
41 { | 41 { |
42 int rc; | 42 int rc; |
43 u_char *prev; | 43 u_char *prev; |
44 off_t size, send, prev_send, aligned, sent, fprev; | 44 off_t size, send, prev_send, aligned, sent, fprev; |
45 off_t header_size, file_size; | 45 off_t header_size, file_size; |
46 ngx_uint_t eintr, complete; | 46 ngx_uint_t eintr; |
47 ngx_err_t err; | 47 ngx_err_t err; |
48 ngx_buf_t *file; | 48 ngx_buf_t *file; |
49 ngx_array_t header, trailer; | 49 ngx_array_t header, trailer; |
50 ngx_event_t *wev; | 50 ngx_event_t *wev; |
51 ngx_chain_t *cl; | 51 ngx_chain_t *cl; |
90 for ( ;; ) { | 90 for ( ;; ) { |
91 file = NULL; | 91 file = NULL; |
92 file_size = 0; | 92 file_size = 0; |
93 header_size = 0; | 93 header_size = 0; |
94 eintr = 0; | 94 eintr = 0; |
95 complete = 0; | |
96 prev_send = send; | 95 prev_send = send; |
97 | 96 |
98 header.nelts = 0; | 97 header.nelts = 0; |
99 trailer.nelts = 0; | 98 trailer.nelts = 0; |
100 | 99 |
309 } | 308 } |
310 | 309 |
311 sent = rc > 0 ? rc : 0; | 310 sent = rc > 0 ? rc : 0; |
312 } | 311 } |
313 | 312 |
314 if (send - prev_send == sent) { | |
315 complete = 1; | |
316 } | |
317 | |
318 c->sent += sent; | 313 c->sent += sent; |
319 | 314 |
320 in = ngx_handle_sent_chain(in, sent); | 315 in = ngx_handle_sent_chain(in, sent); |
321 | 316 |
322 if (eintr) { | 317 if (eintr) { |
323 continue; | 318 continue; |
324 } | 319 } |
325 | 320 |
326 if (!complete) { | 321 if (send - prev_send != sent) { |
327 wev->ready = 0; | 322 wev->ready = 0; |
328 return in; | 323 return in; |
329 } | 324 } |
330 | 325 |
331 if (send >= limit || in == NULL) { | 326 if (send >= limit || in == NULL) { |