Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Jun 2009 22:03:31 +0200
From:      Christoph Mallon <christoph.mallon@gmx.de>
To:        Andre Oppermann <andre@FreeBSD.org>
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
Message-ID:  <4A47CC93.5090908@gmx.de>
In-Reply-To: <200906222308.n5MN856I055711@svn.freebsd.org>
References:  <200906222308.n5MN856I055711@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4A47CC93.5090908>