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: Cui hengbin
Subject: [lwip-devel] [bug #23559] lwip_recvfrom problem with tcp
Date: Fri, 13 Jun 2008 00:29:35 +0000
User-agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)

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

                 Summary: lwip_recvfrom problem with tcp
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: phant
            Submitted on: Friday 06/13/08 at 00:29
                Category: sockets
                Severity: 3 - Normal
              Item Group: Faulty Behaviour
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: 
            lwIP version: CVS Head

    _______________________________________________________

Details:

Hi All:

       when I use lwip_recv with TCP, found lost data sometime.
In lwip_recvfrom's function ,I found problem as follow:

when socket->lastdata!= NULL and has no data in tcp ,it will copy the last
data but found no buf from tcp ,it set errno and return 0,so the last data
can't receive by appilcation.I think it should return off.

if (!buf) {
        /* We should really do some error checking here. */
        LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recvfrom(%d): buf == NULL!\n",
s));
        sock_set_errno(sock, (((sock->conn->pcb.ip!=NULL) &&
(sock->conn->err==ERR_OK))?ETIMEDOUT:err_to_errno(sock->conn->err)));
        return off;//0; changed 
      }

FYI.




    _______________________________________________________

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]