[nginx] svn commit: r4657 - trunk/src/http/modules
mdounin at mdounin.ru
mdounin at mdounin.ru
Mon Jun 4 00:00:31 UTC 2012
Author: mdounin
Date: 2012-06-04 00:00:28 +0000 (Mon, 04 Jun 2012)
New Revision: 4657
URL: http://trac.nginx.org/nginx/changeset/4657/nginx
Log:
Upstream: least_conn compilation fixes.
Removed duplicate call of ngx_http_upstream_init_round_robin_peer()
overlooked during code changes. Rewritten "return lcp->free_rr_peer(...)"
as MSVC doesn't like it.
Modified:
trunk/src/http/modules/ngx_http_upstream_least_conn_module.c
Modified: trunk/src/http/modules/ngx_http_upstream_least_conn_module.c
===================================================================
--- trunk/src/http/modules/ngx_http_upstream_least_conn_module.c 2012-06-03 23:22:41 UTC (rev 4656)
+++ trunk/src/http/modules/ngx_http_upstream_least_conn_module.c 2012-06-04 00:00:28 UTC (rev 4657)
@@ -122,7 +122,6 @@
ngx_http_upstream_init_least_conn_peer(ngx_http_request_t *r,
ngx_http_upstream_srv_conf_t *us)
{
- ngx_int_t rc;
ngx_http_upstream_lc_peer_data_t *lcp;
ngx_http_upstream_least_conn_conf_t *lcf;
@@ -141,8 +140,6 @@
r->upstream->peer.data = &lcp->rrp;
- rc = ngx_http_upstream_init_round_robin_peer(r, us);
-
if (ngx_http_upstream_init_round_robin_peer(r, us) != NGX_OK) {
return NGX_ERROR;
}
@@ -350,7 +347,8 @@
"free least conn peer %ui %ui", pc->tries, state);
if (lcp->rrp.peers->single) {
- return lcp->free_rr_peer(pc, &lcp->rrp, state);
+ lcp->free_rr_peer(pc, &lcp->rrp, state);
+ return;
}
if (state == 0 && pc->tries == 0) {
@@ -359,7 +357,7 @@
lcp->conns[lcp->rrp.current]--;
- return lcp->free_rr_peer(pc, &lcp->rrp, state);
+ lcp->free_rr_peer(pc, &lcp->rrp, state);
}
More information about the nginx-devel
mailing list