lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] Usage of TCP_EVENT_RECV macro


From: Roland Winistörfer
Subject: Re: [lwip-users] Usage of TCP_EVENT_RECV macro
Date: Tue, 07 Sep 2004 14:07:13 +0200
User-agent: Thunderbird 0.7.1 (Windows/20040626)

Hello Leon

Thank you for your answer.
Do you have any idea why the callback is not installed ? I guess this is done automatically at every call of tcp_alloc() ?

BTW: This problem only occurs after the TCP connection is closed.

Regards, Roland


Leon Woestenberg wrote:

Hello Roland, Lee,

For any packet p, the macro first looks if the recv() callback is non-NULL and passes the packet, otherwise drops (simply frees) the given packet p.

In this case, TCP_EVENT_RECV() is called with a NULL packet p to indicate EOF to the callback function.

**The real problem seems to be that the callback function is not installed, i.e. pcb->recv == NULL**

However, the macro should not try to free a NULL packet and shouldn't. I will fix this in CVS.

Regards, Leon.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]