diff options
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/sys_socket.c | 4 | ||||
-rw-r--r-- | sys/kern/uipc_socket2.c | 6 |
2 files changed, 4 insertions, 6 deletions
diff --git a/sys/kern/sys_socket.c b/sys/kern/sys_socket.c index 9078002abbc..f522890eb29 100644 --- a/sys/kern/sys_socket.c +++ b/sys/kern/sys_socket.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sys_socket.c,v 1.45 2020/02/22 11:58:29 anton Exp $ */ +/* $OpenBSD: sys_socket.c,v 1.46 2021/06/07 09:10:32 mpi Exp $ */ /* $NetBSD: sys_socket.c,v 1.13 1995/08/12 23:59:09 mycroft Exp $ */ /* @@ -96,11 +96,9 @@ soo_ioctl(struct file *fp, u_long cmd, caddr_t data, struct proc *p) case FIOASYNC: s = solock(so); if (*(int *)data) { - so->so_state |= SS_ASYNC; so->so_rcv.sb_flags |= SB_ASYNC; so->so_snd.sb_flags |= SB_ASYNC; } else { - so->so_state &= ~SS_ASYNC; so->so_rcv.sb_flags &= ~SB_ASYNC; so->so_snd.sb_flags &= ~SB_ASYNC; } diff --git a/sys/kern/uipc_socket2.c b/sys/kern/uipc_socket2.c index 07ecd09627d..69ec14230e6 100644 --- a/sys/kern/uipc_socket2.c +++ b/sys/kern/uipc_socket2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uipc_socket2.c,v 1.110 2021/05/26 08:28:34 mvs Exp $ */ +/* $OpenBSD: uipc_socket2.c,v 1.111 2021/06/07 09:10:32 mpi Exp $ */ /* $NetBSD: uipc_socket2.c,v 1.11 1996/02/04 02:17:55 christos Exp $ */ /* @@ -409,7 +409,7 @@ sbunlock(struct socket *so, struct sockbuf *sb) /* * Wakeup processes waiting on a socket buffer. * Do asynchronous notification via SIGIO - * if the socket has the SS_ASYNC flag set. + * if the socket buffer has the SB_ASYNC flag set. */ void sowakeup(struct socket *so, struct sockbuf *sb) @@ -421,7 +421,7 @@ sowakeup(struct socket *so, struct sockbuf *sb) sb->sb_flags &= ~SB_WAIT; wakeup(&sb->sb_cc); } - if (so->so_state & SS_ASYNC) + if (sb->sb_flags & SB_ASYNC) pgsigio(&so->so_sigio, SIGIO, 0); selwakeup(&sb->sb_sel); } |