[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-users] conn->err = ERR_CLSD in api_lib.c
From: |
David Shmelzer |
Subject: |
[lwip-users] conn->err = ERR_CLSD in api_lib.c |
Date: |
Tue, 6 Oct 2009 17:32:49 -0400 |
I upgraded to 1.3.1 and it fixed the zero timeout problem I was having. Thanks.
However, I'm still getting a peculiar issue where netconn_recv erroneously sets
conn->err to ERR_CLSD after 3 or so packets in the following section:
/* If we are closed, we indicate that we no longer wish to use the socket */
if (p == NULL) {
memp_free(MEMP_NETBUF, buf);
/* Avoid to lose any previous error code */
if (conn->err == ERR_OK) {
--> conn->err = ERR_CLSD;
}
return NULL;
}
I put a breakpoint there and determined that the preceding call to
sys_arch_mbox_fetch() returns timeout so conn->err should be ERR_TIMEOUT and
not ERR_OK.
So somewhere between sys_arch_mbox_fetch() and the above code conn->err is
being set to ERR_OK.
If I send another packet, ignoring the closed error, it fixes itself.
I then receive the preceding packet and the one just sent.
I'm calling netconn_recv() in a loop in another thread with a zero timeout.
help?
Dave
-----Original Message-----
From: address@hidden [mailto:address@hidden On Behalf Of Simon Goldschmidt
Sent: Tuesday, October 06, 2009 1:25 AM
To: Mailing list for lwIP users
Subject: Re: [lwip-users] sys_arch_mbox_fetch() peek
> So, does implementing this create a way to peek for a message?
No, if there's a message, it is returned, not left in the queue. This is only
for implementing nonblocking recv.
> What should I return as the 'timespent' value?
Zero. This might lead to some jitter in the timers if used from tcpip_thread,
but that will be fixed in 1.4.0, hopefully.
> I'm using lwIP 1.3.0.
Try to use 1.3.1 if possible ;-)
Simon
--
Neu: GMX Doppel-FLAT mit Internet-Flatrate + Telefon-Flatrate für nur 19,99
Euro/mtl.!* http://portal.gmx.net/de/go/dsl02
_______________________________________________
lwip-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-users
- [lwip-users] sys_arch_mbox_fetch() peek, David Shmelzer, 2009/10/05
- Re: [lwip-users] sys_arch_mbox_fetch() peek, Simon Goldschmidt, 2009/10/06
- [lwip-users] conn->err = ERR_CLSD in api_lib.c,
David Shmelzer <=
- Re: [lwip-users] conn->err = ERR_CLSD in api_lib.c, Kieran Mansley, 2009/10/07
- RE: [lwip-users] conn->err = ERR_CLSD in api_lib.c, David Shmelzer, 2009/10/07
- RE: [lwip-users] conn->err = ERR_CLSD in api_lib.c, David Shmelzer, 2009/10/07
- RE: [lwip-users] conn->err = ERR_CLSD in api_lib.c, Kieran Mansley, 2009/10/08
- RE: [lwip-users] conn->err = ERR_CLSD in api_lib.c, David Shmelzer, 2009/10/13
- [lwip-users] TCP payload is doubled, David Shmelzer, 2009/10/13
- Re: [lwip-users] TCP payload is doubled, David Empson, 2009/10/13
- RE: [lwip-users] TCP payload is doubled, David Shmelzer, 2009/10/14
- RE: [lwip-users] TCP payload is doubled, Bill Auerbach, 2009/10/14
- RE: [lwip-users] TCP payload is doubled, David Shmelzer, 2009/10/15