From owner-svn-src-head@FreeBSD.ORG Mon Jun 29 07:24:14 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9779E1065672 for ; Mon, 29 Jun 2009 07:24:14 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.freebsd.org (Postfix) with ESMTP id 028828FC13 for ; Mon, 29 Jun 2009 07:24:13 +0000 (UTC) (envelope-from andre@freebsd.org) Received: (qmail 17308 invoked from network); 29 Jun 2009 07:10:32 -0000 Received: from localhost (HELO [127.0.0.1]) ([127.0.0.1]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 29 Jun 2009 07:10:32 -0000 Message-ID: <4A486C20.2030307@freebsd.org> Date: Mon, 29 Jun 2009 09:24:16 +0200 From: Andre Oppermann User-Agent: Thunderbird 1.5.0.14 (Windows/20071210) MIME-Version: 1.0 To: Christoph Mallon References: <200906222308.n5MN856I055711@svn.freebsd.org> <4A47CC93.5090908@gmx.de> In-Reply-To: <4A47CC93.5090908@gmx.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r194672 - in head/sys: kern netinet sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2009 07:24:15 -0000 Christoph Mallon wrote: > Andre Oppermann schrieb: >> Author: andre >> Date: Mon Jun 22 23:08:05 2009 >> New Revision: 194672 >> URL: http://svn.freebsd.org/changeset/base/194672 >> >> Log: >> Add soreceive_stream(), an optimized version of soreceive() for >> stream (TCP) sockets. > [...] >> Modified: head/sys/kern/uipc_socket.c >> ============================================================================== >> >> --- head/sys/kern/uipc_socket.c Mon Jun 22 22:54:44 2009 (r194671) >> +++ head/sys/kern/uipc_socket.c Mon Jun 22 23:08:05 2009 (r194672) >> @@ -1857,6 +1857,202 @@ release: > [...] >> + /* We will never ever get anything unless we are connected. */ >> + if (!(so->so_state & (SS_ISCONNECTED|SS_ISDISCONNECTED))) { >> + /* When disconnecting there may be still some data left. */ >> + if (sb->sb_cc > 0) >> + goto deliver; >> + if (!(so->so_state & SS_ISDISCONNECTED)) >> + error = ENOTCONN; >> + goto out; >> + } > > It seems either the third "if" is redundant (because the condition of > first "if" implies the condition of the third) or one of the conditions > is wrong. > Also there should be spaces around the |. Thank you for the report. I'm working on fixing and testing all the issues that were raised in the perforce branch to be committed soon after review. -- Andre