Mercurial > hg > nginx-quic
diff src/event/ngx_event_openssl.c @ 399:4e21d1291a14
nginx-0.0.7-2004-07-25-22:34:14 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Sun, 25 Jul 2004 18:34:14 +0000 |
parents | 201b5f68b59f |
children | da8c5707af39 |
line wrap: on
line diff
--- a/src/event/ngx_event_openssl.c +++ b/src/event/ngx_event_openssl.c @@ -118,13 +118,13 @@ ngx_chain_t *ngx_ssl_send_chain(ngx_conn off_t limit) { int n; - ngx_uint_t flush, last; + ngx_uint_t flush; ssize_t send, size; ngx_buf_t *buf; buf = c->ssl->buf; - if (in && in->next == NULL && buf->pos == buf->last && !c->ssl->buffer) { + if (in && in->next == NULL && !c->buffered && !c->ssl->buffer) { /* * we avoid a buffer copy if the incoming buf is a single, @@ -148,14 +148,12 @@ ngx_chain_t *ngx_ssl_send_chain(ngx_conn send = 0; flush = (in == NULL) ? 1 : 0; - last = (in == NULL) ? 1 : 0; for ( ;; ) { while (in && buf->last < buf->end) { if (in->buf->last_buf) { flush = 1; - last = 1; } if (ngx_buf_special(in->buf)) { @@ -226,15 +224,9 @@ ngx_chain_t *ngx_ssl_send_chain(ngx_conn } } - if (in) { - return in; - } + c->buffered = (buf->pos < buf->last) ? 1 : 0; - if (buf->pos == buf->last || !last) { - return NULL; - } - - return NGX_CHAIN_AGAIN; + return in; }