Please... I sent this 2 days ago and got no comment, has noone ever seen
this?
This was well tested, in fact it took me a full day to find the problem
and the work-around.
Should I send this to the BUG list at savanah???
Alain
Alain Mouette escreveu:
I am using lwip 1.3.0. I want to check this before reporting to
bugtracker... maybe it is already fixed.
If I set I timeout for the socket, and then read even if there is no
data available, it returns 0 but I can never send anything anymore using
that socket:
millis=10;
lwip_setsockopt (sd, SOL_SOCKET, SO_RCVTIMEO, &millis, sizeof(millis));
...
if ((len=lwip_read(sd,msgBuf, sizeof(msgBuf))>0)
process_new_data()
else
do_nothing()
If i do it using select to make sure that I will never read if no data
is available, it works fine:
fd_set rfds;
FD_ZERO(&rfds);
FD_SET(sd,&rfds);
tv.tv_sec=0;tv.tv_usec=0;
lwip_select(sd+1,&rfds,NULL,NULL,&tv);
if (FD_ISSET(sd,&rfds))
if ((len=lwip_read(sock,msgBuf, sizeof(msgBuf)))>0)
process_new_data()
I looks like a really bad bug to me... correct me please :)
thanks,
Alain
_______________________________________________
lwip-users mailing list
lwip-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/lwip-users