comparison src/mail/ngx_mail_core_module.c @ 5263:05ba5bce31e0

Core: extended ngx_sock_ntop() with socklen parameter. On Linux, sockaddr length is required to process unix socket addresses properly due to unnamed sockets (which don't have sun_path set at all) and abstract namespace sockets.
author Vladimir Homutov <vl@nginx.com>
date Thu, 11 Jul 2013 16:07:25 +0400
parents cf3e9e6a7624
children bb26f7ceaaf1
comparison
equal deleted inserted replaced
5262:626f288fa5ed 5263:05ba5bce31e0
437 } 437 }
438 438
439 ls->bind = 1; 439 ls->bind = 1;
440 440
441 } else { 441 } else {
442 len = ngx_sock_ntop(sa, buf, NGX_SOCKADDR_STRLEN, 1); 442 len = ngx_sock_ntop(sa, ls->socklen, buf,
443 NGX_SOCKADDR_STRLEN, 1);
443 444
444 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, 445 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
445 "ipv6only is not supported " 446 "ipv6only is not supported "
446 "on addr \"%*s\", ignored", len, buf); 447 "on addr \"%*s\", ignored", len, buf);
447 } 448 }