diff --git a/modules/ngx_http_upstream_iwrr_module/ngx_http_upstream_iwrr_module.c b/modules/ngx_http_upstream_iwrr_module/ngx_http_upstream_iwrr_module.c index 13caf6ff23..e8848bcf40 100644 --- a/modules/ngx_http_upstream_iwrr_module/ngx_http_upstream_iwrr_module.c +++ b/modules/ngx_http_upstream_iwrr_module/ngx_http_upstream_iwrr_module.c @@ -46,7 +46,7 @@ static ngx_int_t ngx_http_upstream_init_iwrr_peer(ngx_http_request_t *r, static ngx_int_t ngx_http_upstream_get_iwrr_peer(ngx_peer_connection_t *pc, void *data); static ngx_http_upstream_rr_peer_t *ngx_http_upstream_get_iwrr( - ngx_http_upstream_iwrr_peer_data_t *oip); + ngx_http_upstream_iwrr_peer_data_t *uip); static ngx_http_upstream_iwrr_queue_t *ngx_http_upstream_iwrr_queue_next( ngx_http_upstream_iwrr_srv_conf_t *uiscf); @@ -229,20 +229,20 @@ ngx_http_upstream_init_iwrr_peer(ngx_http_request_t *r, ngx_http_upstream_srv_conf_t *us) { ngx_http_upstream_iwrr_srv_conf_t *uiscf; - ngx_http_upstream_iwrr_peer_data_t *oip; + ngx_http_upstream_iwrr_peer_data_t *uip; uiscf = ngx_http_conf_upstream_srv_conf(us, ngx_http_upstream_iwrr_module); if (uiscf == NULL) { return NGX_ERROR; } - oip = ngx_palloc(r->pool, sizeof(ngx_http_upstream_iwrr_peer_data_t)); - if (oip == NULL) { + uip = ngx_palloc(r->pool, sizeof(ngx_http_upstream_iwrr_peer_data_t)); + if (uip == NULL) { return NGX_ERROR; } - oip->uiscf = uiscf; - r->upstream->peer.data = &oip->rrp; + uip->uiscf = uiscf; + r->upstream->peer.data = &uip->rrp; if (ngx_http_upstream_init_round_robin_peer(r, us) != NGX_OK) { return NGX_ERROR; @@ -256,7 +256,7 @@ ngx_http_upstream_init_iwrr_peer(ngx_http_request_t *r, static ngx_int_t ngx_http_upstream_get_iwrr_peer(ngx_peer_connection_t *pc, void *data) { - ngx_http_upstream_iwrr_peer_data_t *oip = data; + ngx_http_upstream_iwrr_peer_data_t *uip = data; ngx_int_t rc; ngx_uint_t i, n; @@ -270,7 +270,7 @@ ngx_http_upstream_get_iwrr_peer(ngx_peer_connection_t *pc, void *data) pc->cached = 0; pc->connection = NULL; - rrp = &oip->rrp; + rrp = &uip->rrp; peers = rrp->peers; ngx_http_upstream_rr_peers_wlock(peers); @@ -297,7 +297,7 @@ ngx_http_upstream_get_iwrr_peer(ngx_peer_connection_t *pc, void *data) /* there are several peers */ - peer = ngx_http_upstream_get_iwrr(oip); + peer = ngx_http_upstream_get_iwrr(uip); if (peer == NULL) { goto failed; @@ -330,7 +330,7 @@ ngx_http_upstream_get_iwrr_peer(ngx_peer_connection_t *pc, void *data) rrp->peers = peers->next; - oip->uiscf = oip->uiscf ? oip->uiscf->next : oip->uiscf; + uip->uiscf = uip->uiscf ? uip->uiscf->next : uip->uiscf; n = (rrp->peers->number + (8 * sizeof(uintptr_t) - 1)) / (8 * sizeof(uintptr_t)); @@ -341,7 +341,7 @@ ngx_http_upstream_get_iwrr_peer(ngx_peer_connection_t *pc, void *data) ngx_http_upstream_rr_peers_unlock(peers); - rc = ngx_http_upstream_get_iwrr_peer(pc, oip); + rc = ngx_http_upstream_get_iwrr_peer(pc, uip); if (rc != NGX_BUSY) { return rc; @@ -358,7 +358,7 @@ ngx_http_upstream_get_iwrr_peer(ngx_peer_connection_t *pc, void *data) } static ngx_http_upstream_rr_peer_t * -ngx_http_upstream_get_iwrr(ngx_http_upstream_iwrr_peer_data_t *oip) +ngx_http_upstream_get_iwrr(ngx_http_upstream_iwrr_peer_data_t *uip) { time_t now; uintptr_t m; @@ -371,9 +371,9 @@ ngx_http_upstream_get_iwrr(ngx_http_upstream_iwrr_peer_data_t *oip) now = ngx_time(); - rrp = &oip->rrp; + rrp = &uip->rrp; peers = rrp->peers; - uiscf = oip->uiscf; + uiscf = uip->uiscf; #if (T_NGX_HTTP_UPSTREAM_RANDOM) if (uiscf->init_number == NGX_CONF_UNSET_UINT) {