Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern Preserve SB_ASYNC on the accepted socket. From: Dmi...



details:   https://anonhg.NetBSD.org/src/rev/944e9443d81c
branches:  trunk
changeset: 763989:944e9443d81c
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Apr 09 23:03:59 2011 +0000

description:
Preserve SB_ASYNC on the accepted socket. From: Dmitry Matveev
http://mail-index.netbsd.org/tech-net/2011/02/17/msg002457.html

diffstat:

 sys/kern/uipc_socket2.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (29 lines):

diff -r ec35ed35dd5c -r 944e9443d81c sys/kern/uipc_socket2.c
--- a/sys/kern/uipc_socket2.c   Sat Apr 09 22:09:05 2011 +0000
+++ b/sys/kern/uipc_socket2.c   Sat Apr 09 23:03:59 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uipc_socket2.c,v 1.106 2009/12/30 22:12:12 elad Exp $  */
+/*     $NetBSD: uipc_socket2.c,v 1.107 2011/04/09 23:03:59 christos Exp $      */
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uipc_socket2.c,v 1.106 2009/12/30 22:12:12 elad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_socket2.c,v 1.107 2011/04/09 23:03:59 christos Exp $");
 
 #include "opt_mbuftrace.h"
 #include "opt_sb_max.h"
@@ -285,8 +285,8 @@
        so->so_rcv.sb_lowat = head->so_rcv.sb_lowat;
        so->so_rcv.sb_timeo = head->so_rcv.sb_timeo;
        so->so_snd.sb_timeo = head->so_snd.sb_timeo;
-       so->so_rcv.sb_flags |= head->so_rcv.sb_flags & SB_AUTOSIZE;
-       so->so_snd.sb_flags |= head->so_snd.sb_flags & SB_AUTOSIZE;
+       so->so_rcv.sb_flags |= head->so_rcv.sb_flags & (SB_AUTOSIZE | SB_ASYNC);
+       so->so_snd.sb_flags |= head->so_snd.sb_flags & (SB_AUTOSIZE | SB_ASYNC);
        soqinsque(head, so, soqueue);
        error = (*so->so_proto->pr_usrreq)(so, PRU_ATTACH, NULL, NULL,
            NULL, NULL);



Home | Main Index | Thread Index | Old Index