move tcp_debug_print_state to prevent accessing pcb when it might already be deallocated due to recv_flags == TF_RESET or TF_CLOSED

This commit is contained in:
goldsimon 2009-11-22 15:42:30 +00:00
parent 0c136893e5
commit 1c018caefe

View File

@ -341,12 +341,12 @@ tcp_input(struct pbuf *p, struct netif *inp)
if (err == ERR_OK) {
tcp_output(pcb);
}
}
#if TCP_INPUT_DEBUG
#if TCP_DEBUG
tcp_debug_print_state(pcb->state);
tcp_debug_print_state(pcb->state);
#endif /* TCP_DEBUG */
#endif /* TCP_INPUT_DEBUG */
}
}