Mercurial > hg > nginx
comparison src/os/unix/ngx_freebsd_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 |
---|---|
43 { | 43 { |
44 int rc, flags; | 44 int rc, flags; |
45 u_char *prev; | 45 u_char *prev; |
46 off_t size, send, prev_send, aligned, sent, fprev; | 46 off_t size, send, prev_send, aligned, sent, fprev; |
47 size_t header_size, file_size; | 47 size_t header_size, file_size; |
48 ngx_uint_t eintr, eagain, complete; | 48 ngx_uint_t eintr, eagain; |
49 ngx_err_t err; | 49 ngx_err_t err; |
50 ngx_buf_t *file; | 50 ngx_buf_t *file; |
51 ngx_array_t header, trailer; | 51 ngx_array_t header, trailer; |
52 ngx_event_t *wev; | 52 ngx_event_t *wev; |
53 ngx_chain_t *cl; | 53 ngx_chain_t *cl; |
94 for ( ;; ) { | 94 for ( ;; ) { |
95 file = NULL; | 95 file = NULL; |
96 file_size = 0; | 96 file_size = 0; |
97 header_size = 0; | 97 header_size = 0; |
98 eintr = 0; | 98 eintr = 0; |
99 complete = 0; | |
100 prev_send = send; | 99 prev_send = send; |
101 | 100 |
102 header.nelts = 0; | 101 header.nelts = 0; |
103 trailer.nelts = 0; | 102 trailer.nelts = 0; |
104 | 103 |
360 } | 359 } |
361 | 360 |
362 sent = rc > 0 ? rc : 0; | 361 sent = rc > 0 ? rc : 0; |
363 } | 362 } |
364 | 363 |
365 if (send - prev_send == sent) { | |
366 complete = 1; | |
367 } | |
368 | |
369 c->sent += sent; | 364 c->sent += sent; |
370 | 365 |
371 in = ngx_handle_sent_chain(in, sent); | 366 in = ngx_handle_sent_chain(in, sent); |
372 | 367 |
373 #if (NGX_HAVE_AIO_SENDFILE) | 368 #if (NGX_HAVE_AIO_SENDFILE) |
391 | 386 |
392 if (eintr) { | 387 if (eintr) { |
393 continue; | 388 continue; |
394 } | 389 } |
395 | 390 |
396 if (!complete) { | 391 if (send - prev_send != sent) { |
397 wev->ready = 0; | 392 wev->ready = 0; |
398 return in; | 393 return in; |
399 } | 394 } |
400 | 395 |
401 if (send >= limit || in == NULL) { | 396 if (send >= limit || in == NULL) { |