PR/54435: Valery Ushakov: Clear urgent status after reading urgent data, so
that poll(2) works.
This commit is contained in:
parent
b4ccaa63ea
commit
e12f2e934e
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: uipc_socket.c,v 1.285 2019/10/14 16:27:03 maxv Exp $ */
|
||||
/* $NetBSD: uipc_socket.c,v 1.286 2020/02/18 00:40:50 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2002, 2007, 2008, 2009 The NetBSD Foundation, Inc.
|
||||
@ -71,7 +71,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.285 2019/10/14 16:27:03 maxv Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.286 2020/02/18 00:40:50 christos Exp $");
|
||||
|
||||
#ifdef _KERNEL_OPT
|
||||
#include "opt_compat_netbsd.h"
|
||||
@ -1180,6 +1180,9 @@ soreceive(struct socket *so, struct mbuf **paddr, struct uio *uio,
|
||||
MIN(uio->uio_resid, m->m_len), uio);
|
||||
m = m_free(m);
|
||||
} while (uio->uio_resid > 0 && error == 0 && m);
|
||||
/* We consumed the oob data, no more oobmark. */
|
||||
so->so_oobmark = 0;
|
||||
so->so_state &= ~SS_RCVATMARK;
|
||||
bad:
|
||||
if (m != NULL)
|
||||
m_freem(m);
|
||||
|
Loading…
Reference in New Issue
Block a user