Mercurial > hg > nginx
comparison src/http/modules/ngx_http_upstream_keepalive_module.c @ 5830:3e5b630e0ec9
Upstream keepalive: removed "single" parameter remnants.
The "single" parameter is deprecated and ignored since 5b5c07dee156 (1.3.2).
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Thu, 11 Sep 2014 20:09:04 +0400 |
parents | 822b82191940 |
children | 39befd3c0d84 |
comparison
equal
deleted
inserted
replaced
5829:906530c9ffd2 | 5830:3e5b630e0ec9 |
---|---|
77 | 77 |
78 | 78 |
79 static ngx_command_t ngx_http_upstream_keepalive_commands[] = { | 79 static ngx_command_t ngx_http_upstream_keepalive_commands[] = { |
80 | 80 |
81 { ngx_string("keepalive"), | 81 { ngx_string("keepalive"), |
82 NGX_HTTP_UPS_CONF|NGX_CONF_TAKE12, | 82 NGX_HTTP_UPS_CONF|NGX_CONF_TAKE1, |
83 ngx_http_upstream_keepalive, | 83 ngx_http_upstream_keepalive, |
84 NGX_HTTP_SRV_CONF_OFFSET, | 84 NGX_HTTP_SRV_CONF_OFFSET, |
85 0, | 85 0, |
86 NULL }, | 86 NULL }, |
87 | 87 |
483 ngx_http_upstream_srv_conf_t *uscf; | 483 ngx_http_upstream_srv_conf_t *uscf; |
484 ngx_http_upstream_keepalive_srv_conf_t *kcf = conf; | 484 ngx_http_upstream_keepalive_srv_conf_t *kcf = conf; |
485 | 485 |
486 ngx_int_t n; | 486 ngx_int_t n; |
487 ngx_str_t *value; | 487 ngx_str_t *value; |
488 ngx_uint_t i; | |
489 | 488 |
490 uscf = ngx_http_conf_get_module_srv_conf(cf, ngx_http_upstream_module); | 489 uscf = ngx_http_conf_get_module_srv_conf(cf, ngx_http_upstream_module); |
491 | 490 |
492 if (kcf->original_init_upstream) { | 491 if (kcf->original_init_upstream) { |
493 return "is duplicate"; | 492 return "is duplicate"; |
512 return NGX_CONF_ERROR; | 511 return NGX_CONF_ERROR; |
513 } | 512 } |
514 | 513 |
515 kcf->max_cached = n; | 514 kcf->max_cached = n; |
516 | 515 |
517 for (i = 2; i < cf->args->nelts; i++) { | |
518 | |
519 if (ngx_strcmp(value[i].data, "single") == 0) { | |
520 ngx_conf_log_error(NGX_LOG_WARN, cf, 0, | |
521 "the \"single\" parameter is deprecated"); | |
522 continue; | |
523 } | |
524 | |
525 goto invalid; | |
526 } | |
527 | |
528 return NGX_CONF_OK; | 516 return NGX_CONF_OK; |
529 | 517 } |
530 invalid: | |
531 | |
532 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, | |
533 "invalid parameter \"%V\"", &value[i]); | |
534 | |
535 return NGX_CONF_ERROR; | |
536 } |