sofcantsendmore(struct socket *so)

{

	if ((so->so_state & SS_NOFDREF) == 0) {

            shutdown(so->s,1);           /* send FIN to fhost */

            if (global_readfds) {

                FD_CLR(so->s,global_readfds);

            }

            if (global_xfds) {

                FD_CLR(so->s,global_xfds);

            }

	}

	so->so_state &= ~(SS_ISFCONNECTING);

	if (so->so_state & SS_FCANTRCVMORE) {

	   so->so_state &= SS_PERSISTENT_MASK;

	   so->so_state |= SS_NOFDREF; /* as above */

	} else {

	   so->so_state |= SS_FCANTSENDMORE;

	}

}

sofcantsendmore(struct socket *so)

{

	if ((so->so_state & SS_NOFDREF) == 0) {

            shutdown(so->s,1);           

            if (global_readfds) {

                FD_CLR(so->s,global_readfds);

            }

            if (global_xfds) {

                FD_CLR(so->s,global_xfds);

            }

	}

	so->so_state &= ~(SS_ISFCONNECTING);

	if (so->so_state & SS_FCANTRCVMORE) {

	   so->so_state &= SS_PERSISTENT_MASK;

	   so->so_state |= SS_NOFDREF; 

	} else {

	   so->so_state |= SS_FCANTSENDMORE;

	}

}

FUNC_0(struct socket *VAR_0)

{

	if ((VAR_0->so_state & SS_NOFDREF) == 0) {

            shutdown(VAR_0->s,1);           

            if (global_readfds) {

                FD_CLR(VAR_0->s,global_readfds);

            }

            if (global_xfds) {

                FD_CLR(VAR_0->s,global_xfds);

            }

	}

	VAR_0->so_state &= ~(SS_ISFCONNECTING);

	if (VAR_0->so_state & SS_FCANTRCVMORE) {

	   VAR_0->so_state &= SS_PERSISTENT_MASK;

	   VAR_0->so_state |= SS_NOFDREF; 

	} else {

	   VAR_0->so_state |= SS_FCANTSENDMORE;

	}

}

FUNC_0(struct socket *VAR_0)
{ if ((VAR_0->so_state & SS_NOFDREF) == 0) { shutdown(VAR_0->s,1); if (global_readfds) { FD_CLR(VAR_0->s,global_readfds); } if (global_xfds) { FD_CLR(VAR_0->s,global_xfds); } } VAR_0->so_state &= ~(SS_ISFCONNECTING); if (VAR_0->so_state & SS_FCANTRCVMORE) { VAR_0->so_state &= SS_PERSISTENT_MASK; VAR_0->so_state |= SS_NOFDREF; } else { VAR_0->so_state |= SS_FCANTSENDMORE; } }