diff options
| author | 2014-06-12 15:27:08 +0000 | |
|---|---|---|
| committer | 2014-06-12 15:27:08 +0000 | |
| commit | 48c5ce6cae7e303dfeee3a51091514ba4307bd3d (patch) | |
| tree | 2c947b91869e053e1c22daedc8be6fc26be784d6 /usr.sbin/nginx/src/os/unix/ngx_channel.c | |
| parent | Disable the "switch to insertion sort" optimization to avoid quadratic (diff) | |
| download | wireguard-openbsd-48c5ce6cae7e303dfeee3a51091514ba4307bd3d.tar.xz wireguard-openbsd-48c5ce6cae7e303dfeee3a51091514ba4307bd3d.zip | |
update to 1.6.0 with official syslog support backported from the 1.7 branch
tested by several, ok sthen@
Diffstat (limited to 'usr.sbin/nginx/src/os/unix/ngx_channel.c')
| -rw-r--r-- | usr.sbin/nginx/src/os/unix/ngx_channel.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/nginx/src/os/unix/ngx_channel.c b/usr.sbin/nginx/src/os/unix/ngx_channel.c index 29c69da4065..8e9069660f4 100644 --- a/usr.sbin/nginx/src/os/unix/ngx_channel.c +++ b/usr.sbin/nginx/src/os/unix/ngx_channel.c @@ -34,6 +34,8 @@ ngx_write_channel(ngx_socket_t s, ngx_channel_t *ch, size_t size, msg.msg_control = (caddr_t) &cmsg; msg.msg_controllen = sizeof(cmsg); + ngx_memzero(&cmsg, sizeof(cmsg)); + cmsg.cm.cmsg_len = CMSG_LEN(sizeof(int)); cmsg.cm.cmsg_level = SOL_SOCKET; cmsg.cm.cmsg_type = SCM_RIGHTS; @@ -142,7 +144,7 @@ ngx_read_channel(ngx_socket_t s, ngx_channel_t *ch, size_t size, ngx_log_t *log) if ((size_t) n < sizeof(ngx_channel_t)) { ngx_log_error(NGX_LOG_ALERT, log, 0, - "recvmsg() returned not enough data: %uz", n); + "recvmsg() returned not enough data: %z", n); return NGX_ERROR; } |
