comparison src/stream/ngx_stream_proxy_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 1bd5eb20bd7c
children 4b4aee40c508
comparison
equal deleted inserted replaced
6229:2c045e5b8291 6230:2a621245f4cf
526 #endif 526 #endif
527 527
528 c = s->connection; 528 c = s->connection;
529 529
530 if (c->log->log_level >= NGX_LOG_INFO) { 530 if (c->log->log_level >= NGX_LOG_INFO) {
531 ngx_str_t s; 531 ngx_str_t str;
532 u_char addr[NGX_SOCKADDR_STRLEN]; 532 u_char addr[NGX_SOCKADDR_STRLEN];
533 533
534 s.len = NGX_SOCKADDR_STRLEN; 534 str.len = NGX_SOCKADDR_STRLEN;
535 s.data = addr; 535 str.data = addr;
536 536
537 if (ngx_connection_local_sockaddr(pc, &s, 1) == NGX_OK) { 537 if (ngx_connection_local_sockaddr(pc, &str, 1) == NGX_OK) {
538 handler = c->log->handler; 538 handler = c->log->handler;
539 c->log->handler = NULL; 539 c->log->handler = NULL;
540 540
541 ngx_log_error(NGX_LOG_INFO, c->log, 0, "proxy %V connected to %V", 541 ngx_log_error(NGX_LOG_INFO, c->log, 0, "proxy %V connected to %V",
542 &s, u->peer.name); 542 &str, u->peer.name);
543 543
544 c->log->handler = handler; 544 c->log->handler = handler;
545 } 545 }
546 } 546 }
547 547