lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Problem trying to recieve an UDP packet


From: Iwan Budi Kusnanto
Subject: Re: [lwip-users] Problem trying to recieve an UDP packet
Date: Mon, 28 Nov 2011 17:23:22 +0700

On Mon, Nov 28, 2011 at 4:50 PM, Simon Goldschmidt <address@hidden> wrote:
........
> I'm afraid your example is wrong there: the raw API *must not* be used from 
> multiple threads. In other words, calling udp_bind() and udp_recv() from its 
> own thread will lead to memory corruption (as it manipulates the list of udp 
> pcbs while other threads might also do that). It might work for your small 
> example, but it will fail eventually.
>
> So you might want to just move the code from udpecho_raw_server_thread() to 
> udpecho_raw_server_init(), leave away the sys_thread_new() and you'd have a 
> good example.


Thanks Simon,
I have updated my code

>
> Simon
>



reply via email to

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