svn commit: r194672 - in head/sys: kern netinet sys
Christoph Mallon
christoph.mallon at gmx.de
Sun Jun 28 20:03:34 UTC 2009
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
More information about the svn-src-all
mailing list