Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet/tcp_subr.c
Show First 20 Lines • Show All 1,570 Lines • ▼ Show 20 Lines | #endif | ||||
KASSERT(inp->inp_socket != NULL, ("tcp_close: inp_socket NULL")); | KASSERT(inp->inp_socket != NULL, ("tcp_close: inp_socket NULL")); | ||||
so = inp->inp_socket; | so = inp->inp_socket; | ||||
soisdisconnected(so); | soisdisconnected(so); | ||||
if (inp->inp_flags & INP_SOCKREF) { | if (inp->inp_flags & INP_SOCKREF) { | ||||
KASSERT(so->so_state & SS_PROTOREF, | KASSERT(so->so_state & SS_PROTOREF, | ||||
("tcp_close: !SS_PROTOREF")); | ("tcp_close: !SS_PROTOREF")); | ||||
inp->inp_flags &= ~INP_SOCKREF; | inp->inp_flags &= ~INP_SOCKREF; | ||||
INP_WUNLOCK(inp); | INP_WUNLOCK(inp); | ||||
ACCEPT_LOCK(); | |||||
SOCK_LOCK(so); | SOCK_LOCK(so); | ||||
so->so_state &= ~SS_PROTOREF; | so->so_state &= ~SS_PROTOREF; | ||||
sofree(so); | sofree(so); | ||||
return (NULL); | return (NULL); | ||||
} | } | ||||
return (tp); | return (tp); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 1,180 Lines • Show Last 20 Lines |