comparison src/http/modules/ngx_http_map_module.c @ 6230:2a621245f4cf

Win32: MSVC 2015 compatibility. Resolved warnings about declarations that hide previous local declarations. Warnings about WSASocketA() being deprecated resolved by explicit use of WSASocketW() instead of WSASocket(). When compiling without IPv6 support, WinSock deprecated warnings are disabled to allow use of gethostbyname().
author Maxim Dounin <mdounin@mdounin.ru>
date Mon, 17 Aug 2015 18:09:17 +0300
parents 79b9101cecf4
children f01ab2dbcfdc
comparison
equal deleted inserted replaced
6229:2c045e5b8291 6230:2a621245f4cf
373 373
374 374
375 static char * 375 static char *
376 ngx_http_map(ngx_conf_t *cf, ngx_command_t *dummy, void *conf) 376 ngx_http_map(ngx_conf_t *cf, ngx_command_t *dummy, void *conf)
377 { 377 {
378 ngx_int_t rc, index; 378 ngx_int_t rv, index;
379 ngx_str_t *value, name; 379 ngx_str_t *value, name;
380 ngx_uint_t i, key; 380 ngx_uint_t i, key;
381 ngx_http_map_conf_ctx_t *ctx; 381 ngx_http_map_conf_ctx_t *ctx;
382 ngx_http_variable_value_t *var, **vp; 382 ngx_http_variable_value_t *var, **vp;
383 383
544 if (value[0].len && value[0].data[0] == '\\') { 544 if (value[0].len && value[0].data[0] == '\\') {
545 value[0].len--; 545 value[0].len--;
546 value[0].data++; 546 value[0].data++;
547 } 547 }
548 548
549 rc = ngx_hash_add_key(&ctx->keys, &value[0], var, 549 rv = ngx_hash_add_key(&ctx->keys, &value[0], var,
550 (ctx->hostnames) ? NGX_HASH_WILDCARD_KEY : 0); 550 (ctx->hostnames) ? NGX_HASH_WILDCARD_KEY : 0);
551 551
552 if (rc == NGX_OK) { 552 if (rv == NGX_OK) {
553 return NGX_CONF_OK; 553 return NGX_CONF_OK;
554 } 554 }
555 555
556 if (rc == NGX_DECLINED) { 556 if (rv == NGX_DECLINED) {
557 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, 557 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
558 "invalid hostname or wildcard \"%V\"", &value[0]); 558 "invalid hostname or wildcard \"%V\"", &value[0]);
559 } 559 }
560 560
561 if (rc == NGX_BUSY) { 561 if (rv == NGX_BUSY) {
562 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, 562 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
563 "conflicting parameter \"%V\"", &value[0]); 563 "conflicting parameter \"%V\"", &value[0]);
564 } 564 }
565 565
566 return NGX_CONF_ERROR; 566 return NGX_CONF_ERROR;