Hi
After a few little problems I got the lwIP (version 1.0) with uC/OS
working on my hardware. But there is a little curiosity, if a try to
show the little HTML page over the lwIP.
I often break into the "LWIP_ASSERT("p != NULL", p != NULL);" at the
beginning of the pbuf_free(). This is called from the tcp_input() with
the following code:
/* If a FIN segment was received, we call the callback
function with a NULL buffer to indicate EOF. */
if (recv_flags & TF_GOT_FIN) {
TCP_EVENT_RECV(pcb, NULL, ERR_OK, err);
}
The call of the pbuf_free() is hidden in the TCP_EVENT_RECV macro. But
if I have look into this macro, there is an else case with a call of
pbuf_free(NULL) (in fact the "p" argument of the macro TCP_EVENT_RECV
is always NULL), which always results in the assert condition above.
What's going wrong here ? Is this macro misplaced here (means the else
case) ?