Welcome! Log In Create A New Profile

Advanced

[nginx] svn commit: r5074 - trunk/src/http

Anonymous User
February 18, 2013 10:10AM
Author: mdounin
Date: 2013-02-18 15:08:46 +0000 (Mon, 18 Feb 2013)
New Revision: 5074
URL: http://trac.nginx.org/nginx/changeset/5074/nginx

Log:
Proxy: fixed do_write handling in previous commit.

As rightfully complained by MSVC, do_write variable was used uninitialized.
Correct fix is to set it's initial value based on event happened.


Modified:
trunk/src/http/ngx_http_upstream.c

Modified: trunk/src/http/ngx_http_upstream.c
===================================================================
--- trunk/src/http/ngx_http_upstream.c 2013-02-18 13:50:52 UTC (rev 5073)
+++ trunk/src/http/ngx_http_upstream.c 2013-02-18 15:08:46 UTC (rev 5074)
@@ -55,7 +55,7 @@
static void ngx_http_upstream_upgraded_write_upstream(ngx_http_request_t *r,
ngx_http_upstream_t *u);
static void ngx_http_upstream_process_upgraded(ngx_http_request_t *r,
- ngx_uint_t from_upstream);
+ ngx_uint_t from_upstream, ngx_uint_t do_write);
static void
ngx_http_upstream_process_non_buffered_downstream(ngx_http_request_t *r);
static void
@@ -2432,13 +2432,13 @@
if (u->peer.connection->read->ready
|| u->buffer.pos != u->buffer.last)
{
- ngx_http_upstream_process_upgraded(r, 1);
+ ngx_http_upstream_process_upgraded(r, 1, 1);
}

if (c->read->ready
|| r->header_in->pos != r->header_in->last)
{
- ngx_http_upstream_process_upgraded(r, 0);
+ ngx_http_upstream_process_upgraded(r, 0, 1);
}
}

@@ -2446,14 +2446,14 @@
static void
ngx_http_upstream_upgraded_read_downstream(ngx_http_request_t *r)
{
- ngx_http_upstream_process_upgraded(r, 0);
+ ngx_http_upstream_process_upgraded(r, 0, 0);
}


static void
ngx_http_upstream_upgraded_write_downstream(ngx_http_request_t *r)
{
- ngx_http_upstream_process_upgraded(r, 1);
+ ngx_http_upstream_process_upgraded(r, 1, 1);
}


@@ -2461,7 +2461,7 @@
ngx_http_upstream_upgraded_read_upstream(ngx_http_request_t *r,
ngx_http_upstream_t *u)
{
- ngx_http_upstream_process_upgraded(r, 1);
+ ngx_http_upstream_process_upgraded(r, 1, 0);
}


@@ -2469,18 +2469,17 @@
ngx_http_upstream_upgraded_write_upstream(ngx_http_request_t *r,
ngx_http_upstream_t *u)
{
- ngx_http_upstream_process_upgraded(r, 0);
+ ngx_http_upstream_process_upgraded(r, 0, 1);
}


static void
ngx_http_upstream_process_upgraded(ngx_http_request_t *r,
- ngx_uint_t from_upstream)
+ ngx_uint_t from_upstream, ngx_uint_t do_write)
{
size_t size;
ssize_t n;
ngx_buf_t *b;
- ngx_uint_t do_write;
ngx_connection_t *c, *downstream, *upstream, *dst, *src;
ngx_http_upstream_t *u;
ngx_http_core_loc_conf_t *clcf;

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] svn commit: r5074 - trunk/src/http

Anonymous User 915 February 18, 2013 10:10AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 218
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready