summaryrefslogtreecommitdiff
path: root/sys/kern/uipc_socket2.c
diff options
context:
space:
mode:
authorVitaliy Makkoveev <mvs@cvs.openbsd.org>2023-01-22 12:05:45 +0000
committerVitaliy Makkoveev <mvs@cvs.openbsd.org>2023-01-22 12:05:45 +0000
commit5c15bbbf77e86abb44b50581f9057ad7eecc08f4 (patch)
treee6c68e21533dd75f90aca8793d92f7c9dc1738e7 /sys/kern/uipc_socket2.c
parentf3a571600a43ee07cf10f877ca5d495eb101ce2a (diff)
Move SS_CANTRCVMORE and SS_RCVATMARK bits from `so_state' to `sb_state' of
receive buffer. As it was done for SS_CANTSENDMORE bit, the definition kept as is, but now these bits belongs to the `sb_state' of receive buffer. `sb_state' ored with `so_state' when socket data exporting to the userland. ok bluhm@
Diffstat (limited to 'sys/kern/uipc_socket2.c')
-rw-r--r--sys/kern/uipc_socket2.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/kern/uipc_socket2.c b/sys/kern/uipc_socket2.c
index 3fb722bc2b2..4b6f1e9708e 100644
--- a/sys/kern/uipc_socket2.c
+++ b/sys/kern/uipc_socket2.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uipc_socket2.c,v 1.132 2023/01/21 11:23:23 mvs Exp $ */
+/* $OpenBSD: uipc_socket2.c,v 1.133 2023/01/22 12:05:44 mvs Exp $ */
/* $NetBSD: uipc_socket2.c,v 1.11 1996/02/04 02:17:55 christos Exp $ */
/*
@@ -142,7 +142,8 @@ soisdisconnecting(struct socket *so)
{
soassertlocked(so);
so->so_state &= ~SS_ISCONNECTING;
- so->so_state |= (SS_ISDISCONNECTING|SS_CANTRCVMORE);
+ so->so_state |= SS_ISDISCONNECTING;
+ so->so_rcv.sb_state |= SS_CANTRCVMORE;
so->so_snd.sb_state |= SS_CANTSENDMORE;
wakeup(&so->so_timeo);
sowwakeup(so);
@@ -154,7 +155,8 @@ soisdisconnected(struct socket *so)
{
soassertlocked(so);
so->so_state &= ~(SS_ISCONNECTING|SS_ISCONNECTED|SS_ISDISCONNECTING);
- so->so_state |= (SS_CANTRCVMORE|SS_ISDISCONNECTED);
+ so->so_state |= SS_ISDISCONNECTED;
+ so->so_rcv.sb_state |= SS_CANTRCVMORE;
so->so_snd.sb_state |= SS_CANTSENDMORE;
wakeup(&so->so_timeo);
sowwakeup(so);
@@ -344,7 +346,7 @@ void
socantrcvmore(struct socket *so)
{
soassertlocked(so);
- so->so_state |= SS_CANTRCVMORE;
+ so->so_rcv.sb_state |= SS_CANTRCVMORE;
sorwakeup(so);
}