From owner-freebsd-current@FreeBSD.ORG Thu Jan 15 08:13:34 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F3E8F16A4CE for ; Thu, 15 Jan 2004 08:13:33 -0800 (PST) Received: from mailtoaster1.pipeline.ch (mailtoaster1.pipeline.ch [62.48.0.70]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6294D43D3F for ; Thu, 15 Jan 2004 08:13:30 -0800 (PST) (envelope-from andre@freebsd.org) Received: (qmail 49511 invoked from network); 15 Jan 2004 16:13:29 -0000 Received: from unknown (HELO freebsd.org) ([62.48.0.54]) (envelope-sender ) by mailtoaster1.pipeline.ch (qmail-ldap-1.03) with SMTP for ; 15 Jan 2004 16:13:29 -0000 Message-ID: <4006BC29.7CAE053B@freebsd.org> Date: Thu, 15 Jan 2004 17:13:29 +0100 From: Andre Oppermann X-Mailer: Mozilla 4.76 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: freebsd-current@freebsd.org Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: uipc_socket2.c sbflush question X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2004 16:13:34 -0000 In sys/kern/uipc_socket2.c:160 we have this: void soisdisconnected(so) register struct socket *so; { so->so_state &= ~(SS_ISCONNECTING|SS_ISCONNECTED|SS_ISDISCONNECTING); so->so_state |= (SS_CANTRCVMORE|SS_CANTSENDMORE|SS_ISDISCONNECTED); wakeup(&so->so_timeo); sbdrop(&so->so_snd, so->so_snd.sb_cc); sowwakeup(so); sorwakeup(so); } Why is sbdrop() called directly instead of sbflush()? I think it makes more sense to change that to a call to sbflush() which then DTRT? -- Andre