lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] how to free udp pcb


From: Rahul Gundecha
Subject: [lwip-users] how to free udp pcb
Date: Fri, 6 Jan 2012 19:42:42 +0530

Hi all,

I am writing a dns client and is using UDP sockets for the same.

I observed that UDP PCBs are not getting freed up, even after closing the sockets.
In my code,  the sockets are closed by calling lwip_close().

Call sequence here is:
lwip_close -> netconn_delete -> netconn_free

The comments on netconn_free() function says this -
 * Delete a netconn and all its resources.
 * The pcb is NOT freed (since we might not be in the right thread context do this).

If this is the case, then which is the right place to free up the udp pcb?
I tried to explicitly free up udp pcb associated with the socket by adding following code in netconn_delete(); still the problem persists.

if(conn->pcb.udp != NULL) {
udp_remove(conn->pcb.udp);
}

Thanks,
Rahul


reply via email to

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