diff options
author | Vladimir Homutov <vl@nginx.com> | 2013-07-11 16:07:25 +0400 |
---|---|---|
committer | Vladimir Homutov <vl@nginx.com> | 2013-07-11 16:07:25 +0400 |
commit | af18946d769296d9efead825a0d1aa6a1a41fe74 (patch) | |
tree | 6b34cebcacea394e0126bcff647a3e73ab25c36d /src/core/ngx_inet.h | |
parent | 050f74b751c10eeb2491ec6509d0508a7e690209 (diff) |
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.
Diffstat (limited to 'src/core/ngx_inet.h')
-rw-r--r-- | src/core/ngx_inet.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/ngx_inet.h b/src/core/ngx_inet.h index 6a5a3687d..d8f44c1e7 100644 --- a/src/core/ngx_inet.h +++ b/src/core/ngx_inet.h @@ -107,8 +107,8 @@ in_addr_t ngx_inet_addr(u_char *text, size_t len); ngx_int_t ngx_inet6_addr(u_char *p, size_t len, u_char *addr); size_t ngx_inet6_ntop(u_char *p, u_char *text, size_t len); #endif -size_t ngx_sock_ntop(struct sockaddr *sa, u_char *text, size_t len, - ngx_uint_t port); +size_t ngx_sock_ntop(struct sockaddr *sa, socklen_t socklen, u_char *text, + size_t len, ngx_uint_t port); size_t ngx_inet_ntop(int family, void *addr, u_char *text, size_t len); ngx_int_t ngx_ptocidr(ngx_str_t *text, ngx_cidr_t *cidr); ngx_int_t ngx_parse_addr(ngx_pool_t *pool, ngx_addr_t *addr, u_char *text, |