lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [bug #23559] lwip_recvfrom problem with tcp


From: Kieran Mansley
Subject: [lwip-devel] [bug #23559] lwip_recvfrom problem with tcp
Date: Wed, 11 Mar 2009 14:35:56 +0000
User-agent: Opera/9.21 (X11; Linux i686; U; en)

Update of bug #23559 (project lwip):

                  Status:               Need Info => None                   

    _______________________________________________________

Follow-up Comment #9:

I think I understand this now.  The problem is as follows:

lwip_recvfrom() has a do {} while; loop.  On entry to this function there is
some data in sock->lastdata.  The first time round the loop the data in
sock->lastdata is used and copied to the application buffer.  It's got more
space in the buffer so it has another go around the loop, but this time
sock->lastdata is empty, so it tries to get more data from the layer below by
calling netconn_recv().  This returns an error because the other end has
closed the connection, and so we return an error.  By returning an error we
don't inform the application that we have just delivered some data into its
buffer (the first iteration of the loop).

The correct behaviour would I think be to drop out of the loop when we get an
error from netconn_recv if we've already copied some data, and finish
processing the data we've delivered in the normal way.  This would then assume
that the error will be reported to the application next time they call
lwip_recvfrom.

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?23559>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/





reply via email to

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