From owner-svn-src-head@FreeBSD.ORG Sun Jun 28 20:03:34 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 70218106564A for ; Sun, 28 Jun 2009 20:03:34 +0000 (UTC) (envelope-from christoph.mallon@gmx.de) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.freebsd.org (Postfix) with SMTP id B75468FC13 for ; Sun, 28 Jun 2009 20:03:33 +0000 (UTC) (envelope-from christoph.mallon@gmx.de) Received: (qmail invoked by alias); 28 Jun 2009 20:03:31 -0000 Received: from p54A3CAD4.dip.t-dialin.net (EHLO tron.homeunix.org) [84.163.202.212] by mail.gmx.net (mp014) with SMTP; 28 Jun 2009 22:03:31 +0200 X-Authenticated: #1673122 X-Provags-ID: V01U2FsdGVkX1/KlZ1Zzr/KSUP3WfGYzlpv92I15XzLUL0e1brq6f xpo9vjcf7HdtWc Message-ID: <4A47CC93.5090908@gmx.de> Date: Sun, 28 Jun 2009 22:03:31 +0200 From: Christoph Mallon User-Agent: Thunderbird 2.0.0.22 (X11/20090628) MIME-Version: 1.0 To: Andre Oppermann References: <200906222308.n5MN856I055711@svn.freebsd.org> In-Reply-To: <200906222308.n5MN856I055711@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.53 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: Sun, 28 Jun 2009 20:03:34 -0000 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 |. Regards Christoph