lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [patch #5957] Safe-thread problem inside netconn_recv


From: Frédéric Bernon
Subject: [lwip-devel] [patch #5957] Safe-thread problem inside netconn_recv
Date: Wed, 23 May 2007 09:04:52 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3

URL:
  <http://savannah.nongnu.org/patch/?5957>

                 Summary: Safe-thread problem inside netconn_recv
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: fbernon
            Submitted on: mercredi 23.05.2007 à 11:04
                Category: None
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: fbernon
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

In a NETCONN_TCP connection, if an TCP error happens, tcpip_thread will call
err_tcp, which post a NULL message to conn->recvmbox. When the application
side fetch the NULL message, it close the recvmbox and set it to
SYS_MBOX_NULL. It seems safer to only set the conn->err to ERR_CLSD to notify
the application, and to let it close the connection (which will "drain" any
other message in a safer way). In netconn_recv, the modification will be :

if (p == NULL) {
  memp_free(MEMP_NETBUF, buf);
  conn->err = ERR_CLSD;
  return NULL;
}






    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?5957>

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





reply via email to

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