Klaus Demo nginx / ebc050d
change variable name Igor Sysoev 13 years ago
1 changed file(s) with 7 addition(s) and 7 deletion(s). Raw diff Collapse all Expand all
596596 static char *
597597 ngx_http_memcached_pass(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
598598 {
599 ngx_http_memcached_loc_conf_t *lcf = conf;
599 ngx_http_memcached_loc_conf_t *mlcf = conf;
600600
601601 ngx_str_t *value;
602602 ngx_url_t u;
603603 ngx_http_core_loc_conf_t *clcf;
604604
605 if (lcf->upstream.upstream) {
605 if (mlcf->upstream.upstream) {
606606 return "is duplicate";
607607 }
608608
613613 u.url = value[1];
614614 u.no_resolve = 1;
615615
616 lcf->upstream.upstream = ngx_http_upstream_add(cf, &u, 0);
617 if (lcf->upstream.upstream == NULL) {
616 mlcf->upstream.upstream = ngx_http_upstream_add(cf, &u, 0);
617 if (mlcf->upstream.upstream == NULL) {
618618 return NGX_CONF_ERROR;
619619 }
620620
626626 clcf->auto_redirect = 1;
627627 }
628628
629 lcf->index = ngx_http_get_variable_index(cf, &ngx_http_memcached_key);
630
631 if (lcf->index == NGX_ERROR) {
629 mlcf->index = ngx_http_get_variable_index(cf, &ngx_http_memcached_key);
630
631 if (mlcf->index == NGX_ERROR) {
632632 return NGX_CONF_ERROR;
633633 }
634634