summaryrefslogtreecommitdiff
path: root/sys/netinet/tcp_usrreq.c
diff options
context:
space:
mode:
authorRobert Watson <rwatson@FreeBSD.org>2007-05-31 12:06:02 +0000
committerRobert Watson <rwatson@FreeBSD.org>2007-05-31 12:06:02 +0000
commitabc7d91030f4e3b050970d9049846302c1d015e4 (patch)
tree20c92849e56f5cbc345cc8f39389afa199946479 /sys/netinet/tcp_usrreq.c
parent9e223287c05be2947379d5b6fdf4c8f8882b38f5 (diff)
Notes
Diffstat (limited to 'sys/netinet/tcp_usrreq.c')
-rw-r--r--sys/netinet/tcp_usrreq.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c
index 8845efcef691..98bc313b05e6 100644
--- a/sys/netinet/tcp_usrreq.c
+++ b/sys/netinet/tcp_usrreq.c
@@ -1518,7 +1518,6 @@ tcp_usrclosed(struct tcpcb *tp)
INP_LOCK_ASSERT(tp->t_inpcb);
switch (tp->t_state) {
-
case TCPS_CLOSED:
case TCPS_LISTEN:
tp->t_state = TCPS_CLOSED;
@@ -1544,14 +1543,14 @@ tcp_usrclosed(struct tcpcb *tp)
tp->t_state = TCPS_LAST_ACK;
break;
}
- if (tp && tp->t_state >= TCPS_FIN_WAIT_2) {
+ if (tp->t_state >= TCPS_FIN_WAIT_2) {
soisdisconnected(tp->t_inpcb->inp_socket);
- /* To prevent the connection hanging in FIN_WAIT_2 forever. */
+ /* Prevent the connection hanging in FIN_WAIT_2 forever. */
if (tp->t_state == TCPS_FIN_WAIT_2) {
int timeout;
timeout = (tcp_fast_finwait2_recycle) ?
- tcp_finwait2_timeout : tcp_maxidle;
+ tcp_finwait2_timeout : tcp_maxidle;
tcp_timer_activate(tp, TT_2MSL, timeout);
}
}