diff options
author | Igor Sysoev <igor@sysoev.ru> | 2017-06-27 20:06:56 +0300 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2017-06-27 20:06:56 +0300 |
commit | cf3e714c3905bcb532c1cb95de72dec311418f5c (patch) | |
tree | ab862752be2e881742d1fa33ab778c8a687c5991 /src | |
parent | 9041d276fc6a4cb1fec5ffe445d57ac139cfaa5c (diff) | |
download | unit-cf3e714c3905bcb532c1cb95de72dec311418f5c.tar.gz unit-cf3e714c3905bcb532c1cb95de72dec311418f5c.tar.bz2 |
Fixed Unix sockaddr processing in nxt_sockaddr_text().
Diffstat (limited to 'src')
-rw-r--r-- | src/nxt_sockaddr.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/nxt_sockaddr.c b/src/nxt_sockaddr.c index 4bfff2b0..70bdfa06 100644 --- a/src/nxt_sockaddr.c +++ b/src/nxt_sockaddr.c @@ -245,19 +245,16 @@ nxt_sockaddr_text(nxt_sockaddr_t *sa) #if (NXT_HAVE_UNIX_DOMAIN) case AF_UNIX: - - offset = offsetof(nxt_sockaddr_t, u) + sizeof(struct sockaddr_un); + offset = offsetof(nxt_sockaddr_t, u) + sa->socklen; sa->start = offset; sa->address_start = offset; start = nxt_pointer_to(sa, offset); - p = start; + p = (u_char *) sa->u.sockaddr_un.sun_path; #if (NXT_LINUX) - p = (u_char *) sa->u.sockaddr_un.sun_path; - if (p[0] == '\0') { int length; |