lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [bug #28853] recv() returns 0 on receive time-out / any net


From: Stephane Lesage
Subject: [lwip-devel] [bug #28853] recv() returns 0 on receive time-out / any netconn_recv() error
Date: Tue, 09 Feb 2010 18:15:53 +0000
User-agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727; .NET CLR 1.1.4322; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)

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

                 Summary: recv() returns 0 on receive time-out / any
netconn_recv() error
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: slesage
            Submitted on: mar 09 fév 2010 19:15:52 CET
                Category: sockets
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: 
            lwIP version: CVS Head

    _______________________________________________________

Details:

Hi,

read() and recv() should return error=-1 on receive time-out with socket
error EWOULDBLOCK.

actually the bug also returns 0 on any netconn_recv() error.

diff -u -r1.147 sockets.c
--- sockets.c   8 Feb 2010 17:25:57 -0000       1.147
+++ sockets.c   9 Feb 2010 18:10:10 -0000
@@ -544,7 +544,7 @@
         LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_recvfrom(%d): buf == NULL, error
is \"%s\"!\n",
           s, lwip_strerr(err)));
         sock_set_errno(sock, err_to_errno(err));
-        return 0;
+        return -1;
       }
       LWIP_ASSERT("buf != NULL", buf != NULL);
       sock->lastdata = buf;






    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  Message posté via/par Savannah
  http://savannah.nongnu.org/





reply via email to

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