diff src/core/ngx_output_chain.c @ 372:6639b93e81b2 NGINX_0_6_30

nginx 0.6.30 *) Change: now if an "include" directive pattern does not match any file, then nginx does not issue an error. *) Feature: now the time in directives may be specified without spaces, for example, "1h50m". *) Bugfix: memory leaks if the "ssl_verify_client" directive was on. Thanks to Chavelle Vincent. *) Bugfix: the "sub_filter" directive might set text to change into output. *) Bugfix: the "error_page" directive did not take into account arguments in redirected URI. *) Bugfix: now nginx always opens files in binary mode under Cygwin. *) Bugfix: nginx could not be built on OpenBSD; bug appeared in 0.6.15.
author Igor Sysoev <http://sysoev.ru>
date Tue, 29 Apr 2008 00:00:00 +0400
parents 94e16de3c33f
children 0b6053502c55
line wrap: on
line diff
--- a/src/core/ngx_output_chain.c
+++ b/src/core/ngx_output_chain.c
@@ -433,8 +433,11 @@ ngx_chain_writer(void *data, ngx_chain_t
 {
     ngx_chain_writer_ctx_t *ctx = data;
 
-    off_t         size;
-    ngx_chain_t  *cl;
+    off_t              size;
+    ngx_chain_t       *cl;
+    ngx_connection_t  *c;
+
+    c = ctx->connection;
 
     for (size = 0; in; in = in->next) {
 
@@ -446,7 +449,7 @@ ngx_chain_writer(void *data, ngx_chain_t
 
         size += ngx_buf_size(in->buf);
 
-        ngx_log_debug2(NGX_LOG_DEBUG_CORE, ctx->connection->log, 0,
+        ngx_log_debug2(NGX_LOG_DEBUG_CORE, c->log, 0,
                        "chain writer buf fl:%d s:%uO",
                        in->buf->flush, ngx_buf_size(in->buf));
 
@@ -461,7 +464,7 @@ ngx_chain_writer(void *data, ngx_chain_t
         ctx->last = &cl->next;
     }
 
-    ngx_log_debug1(NGX_LOG_DEBUG_CORE, ctx->connection->log, 0,
+    ngx_log_debug1(NGX_LOG_DEBUG_CORE, c->log, 0,
                    "chain writer in: %p", ctx->out);
 
     for (cl = ctx->out; cl; cl = cl->next) {
@@ -476,14 +479,13 @@ ngx_chain_writer(void *data, ngx_chain_t
         size += ngx_buf_size(cl->buf);
     }
 
-    if (size == 0 && !ctx->connection->buffered) {
+    if (size == 0 && !c->buffered) {
         return NGX_OK;
     }
 
-    ctx->out = ctx->connection->send_chain(ctx->connection, ctx->out,
-                                           ctx->limit);
+    ctx->out = c->send_chain(c, ctx->out, ctx->limit);
 
-    ngx_log_debug1(NGX_LOG_DEBUG_CORE, ctx->connection->log, 0,
+    ngx_log_debug1(NGX_LOG_DEBUG_CORE, c->log, 0,
                    "chain writer out: %p", ctx->out);
 
     if (ctx->out == NGX_CHAIN_ERROR) {
@@ -493,7 +495,7 @@ ngx_chain_writer(void *data, ngx_chain_t
     if (ctx->out == NULL) {
         ctx->last = &ctx->out;
 
-        if (!ctx->connection->buffered) {
+        if (!c->buffered) {
             return NGX_OK;
         }
     }