Mercurial > hg > nginx-quic
comparison src/http/modules/ngx_http_memcached_module.c @ 2392:3530e5bd4826
change variable name
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Wed, 10 Dec 2008 14:46:34 +0000 |
parents | d88e757cc7d8 |
children | c7d57b539248 |
comparison
equal
deleted
inserted
replaced
2391:d88e757cc7d8 | 2392:3530e5bd4826 |
---|---|
595 | 595 |
596 | 596 |
597 static char * | 597 static char * |
598 ngx_http_memcached_pass(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) | 598 ngx_http_memcached_pass(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) |
599 { | 599 { |
600 ngx_http_memcached_loc_conf_t *lcf = conf; | 600 ngx_http_memcached_loc_conf_t *mlcf = conf; |
601 | 601 |
602 ngx_str_t *value; | 602 ngx_str_t *value; |
603 ngx_url_t u; | 603 ngx_url_t u; |
604 ngx_http_core_loc_conf_t *clcf; | 604 ngx_http_core_loc_conf_t *clcf; |
605 | 605 |
606 if (lcf->upstream.upstream) { | 606 if (mlcf->upstream.upstream) { |
607 return "is duplicate"; | 607 return "is duplicate"; |
608 } | 608 } |
609 | 609 |
610 value = cf->args->elts; | 610 value = cf->args->elts; |
611 | 611 |
612 ngx_memzero(&u, sizeof(ngx_url_t)); | 612 ngx_memzero(&u, sizeof(ngx_url_t)); |
613 | 613 |
614 u.url = value[1]; | 614 u.url = value[1]; |
615 u.no_resolve = 1; | 615 u.no_resolve = 1; |
616 | 616 |
617 lcf->upstream.upstream = ngx_http_upstream_add(cf, &u, 0); | 617 mlcf->upstream.upstream = ngx_http_upstream_add(cf, &u, 0); |
618 if (lcf->upstream.upstream == NULL) { | 618 if (mlcf->upstream.upstream == NULL) { |
619 return NGX_CONF_ERROR; | 619 return NGX_CONF_ERROR; |
620 } | 620 } |
621 | 621 |
622 clcf = ngx_http_conf_get_module_loc_conf(cf, ngx_http_core_module); | 622 clcf = ngx_http_conf_get_module_loc_conf(cf, ngx_http_core_module); |
623 | 623 |
625 | 625 |
626 if (clcf->name.data[clcf->name.len - 1] == '/') { | 626 if (clcf->name.data[clcf->name.len - 1] == '/') { |
627 clcf->auto_redirect = 1; | 627 clcf->auto_redirect = 1; |
628 } | 628 } |
629 | 629 |
630 lcf->index = ngx_http_get_variable_index(cf, &ngx_http_memcached_key); | 630 mlcf->index = ngx_http_get_variable_index(cf, &ngx_http_memcached_key); |
631 | 631 |
632 if (lcf->index == NGX_ERROR) { | 632 if (mlcf->index == NGX_ERROR) { |
633 return NGX_CONF_ERROR; | 633 return NGX_CONF_ERROR; |
634 } | 634 } |
635 | 635 |
636 return NGX_CONF_OK; | 636 return NGX_CONF_OK; |
637 } | 637 } |