nxt_sockaddr.c (358:40bbd4c2349d) nxt_sockaddr.c (493:745222d540a2)
1
2/*
3 * Copyright (C) Igor Sysoev
4 * Copyright (C) NGINX, Inc.
5 */
6
7#include <nxt_main.h>
8

--- 273 unchanged lines hidden (view full) ---

282 case AF_UNIX:
283 sa->address_start = offset;
284
285 p = (u_char *) sa->u.sockaddr_un.sun_path;
286
287#if (NXT_LINUX)
288
289 if (p[0] == '\0') {
1
2/*
3 * Copyright (C) Igor Sysoev
4 * Copyright (C) NGINX, Inc.
5 */
6
7#include <nxt_main.h>
8

--- 273 unchanged lines hidden (view full) ---

282 case AF_UNIX:
283 sa->address_start = offset;
284
285 p = (u_char *) sa->u.sockaddr_un.sun_path;
286
287#if (NXT_LINUX)
288
289 if (p[0] == '\0') {
290 int length;
290 size_t length;
291
292 /* Linux abstract socket address has no trailing zero. */
293 length = sa->socklen - offsetof(struct sockaddr_un, sun_path);
294
295 p = nxt_sprintf(start, end, "unix:@%*s", length - 1, p + 1);
296
297 } else {
298 p = nxt_sprintf(start, end, "unix:%s", p);

--- 174 unchanged lines hidden (view full) ---

473
474 case AF_UNIX:
475
476#if (NXT_LINUX)
477
478 p = (u_char *) sa->u.sockaddr_un.sun_path;
479
480 if (p[0] == '\0') {
291
292 /* Linux abstract socket address has no trailing zero. */
293 length = sa->socklen - offsetof(struct sockaddr_un, sun_path);
294
295 p = nxt_sprintf(start, end, "unix:@%*s", length - 1, p + 1);
296
297 } else {
298 p = nxt_sprintf(start, end, "unix:%s", p);

--- 174 unchanged lines hidden (view full) ---

473
474 case AF_UNIX:
475
476#if (NXT_LINUX)
477
478 p = (u_char *) sa->u.sockaddr_un.sun_path;
479
480 if (p[0] == '\0') {
481 int length;
481 size_t length;
482
483 /* Linux abstract socket address has no trailing zero. */
484
485 length = sa->socklen - offsetof(struct sockaddr_un, sun_path) - 1;
486 p = nxt_sprintf(buf, end, "unix:\\0%*s", length, p + 1);
487
488 } else {
489 p = nxt_sprintf(buf, end, "unix:%s", p);

--- 825 unchanged lines hidden ---
482
483 /* Linux abstract socket address has no trailing zero. */
484
485 length = sa->socklen - offsetof(struct sockaddr_un, sun_path) - 1;
486 p = nxt_sprintf(buf, end, "unix:\\0%*s", length, p + 1);
487
488 } else {
489 p = nxt_sprintf(buf, end, "unix:%s", p);

--- 825 unchanged lines hidden ---