aboutsummaryrefslogtreecommitdiff
path: root/src/os/unix/ngx_channel.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/os/unix/ngx_channel.c')
-rw-r--r--src/os/unix/ngx_channel.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/os/unix/ngx_channel.c b/src/os/unix/ngx_channel.c
index 853c5d6fd..c052b6022 100644
--- a/src/os/unix/ngx_channel.c
+++ b/src/os/unix/ngx_channel.c
@@ -137,7 +137,7 @@ ngx_int_t ngx_read_channel(ngx_socket_t s, ngx_channel_t *ch, size_t size,
if (ch->command == NGX_CMD_OPEN_CHANNEL) {
- if (cmsg.cm.cmsg_len < sizeof(cmsg)) {
+ if (cmsg.cm.cmsg_len < (socklen_t) sizeof(cmsg)) {
ngx_log_error(NGX_LOG_ALERT, log, 0,
"recvmsg() returned too small ancillary data");
return NGX_ERROR;
@@ -215,7 +215,7 @@ ngx_int_t ngx_add_channel_event(ngx_cycle_t *cycle, ngx_fd_t fd,
ev = (event == NGX_READ_EVENT) ? rev : wev;
- ev->event_handler = handler;
+ ev->handler = handler;
if (ngx_add_conn && (ngx_event_flags & NGX_USE_EPOLL_EVENT) == 0) {
if (ngx_add_conn(c) == NGX_ERROR) {