I traced the problem to conn->err being assigned a value in separate threads. One in recv_tcp() and another in netconn_recv().
recv_tcp() is called from the tcpip_thread and netconn_recv() is called from a separate thread. Am I using netconns incorrectly? If so, shouldn't conn->err be a thread safe variable since it is accessed from tcpip_thread as well as the thread using the netconn api? conn->recv_avail is thread safe. Dave -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of David Shmelzer Sent: Wednesday, October 07, 2009 10:44 AM To: Mailing list for lwIP users Subject: RE: [lwip-users] conn->err = ERR_CLSD in api_lib.c No, same thread. I just meant that I'm calling the netconn functions from a separate thread from the lwip thread. So I should not have mentioned that. However, the symptoms I am having do seem to be as if the conn structure is being written to by another thread. I just don't see it. I only have the one thread accessing the netconn functions. If no one else has reported such behaviour it must be my code. I'm stumped but I'll keep digging. I need to bring in a stump remover. -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Kieran Mansley Sent: Wednesday, October 07, 2009 4:09 AM To: Mailing list for lwIP users Subject: Re: [lwip-users] conn->err = ERR_CLSD in api_lib.c On Tue, 2009-10-06 at 17:32 -0400, David Shmelzer wrote: > I'm calling netconn_recv() in a loop in another thread with a zero timeout. > help? Does that mean you're using the same connection from two different threads? That would certainly explain the problem. It's not supported I'm afraid. Kieran _______________________________________________ lwip-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/lwip-users _______________________________________________ lwip-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/lwip-users _______________________________________________ lwip-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/lwip-users
