[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-users] Usage of TCP_EVENT_RECV macro
From: |
Roland Winistörfer |
Subject: |
[lwip-users] Usage of TCP_EVENT_RECV macro |
Date: |
Mon, 06 Sep 2004 17:19:55 +0200 |
User-agent: |
Thunderbird 0.7.1 (Windows/20040626) |
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) ?
Thank you very much for your help.
Regards, Roland
- [lwip-users] Usage of TCP_EVENT_RECV macro,
Roland Winistörfer <=