[Top][All Lists]

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

[lwip-devel] [patch #5958] netconn_listen & netconn_accept error handlin

From: Frédéric Bernon
Subject: [lwip-devel] [patch #5958] netconn_listen & netconn_accept error handling
Date: Wed, 23 May 2007 09:21:13 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv: Gecko/20070309 Firefox/


                 Summary: netconn_listen & netconn_accept error handling
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: fbernon
            Submitted on: mercredi 23.05.2007 à 11:21
                Category: None
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: fbernon
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any



if your call netconn_accept without any previous netconn_listen call, the
acceptmbox is not valide, and you can have an error (consequence is "port
dependant"). I propose to add a simple guard inside netconn_accept:

if (conn->acceptmbox == SYS_MBOX_NULL) {
  return ERR_VAL;

For "listen", the code to allocate the acceptmbox is done inside
netconn_listen AND inside do_listen. I propose to remove the code inside
netconn_listen, because there is a better error handling in do_listen
(netconn type check, check tcp_listen return values...)


Reply to this item at:


  Message posté via/par Savannah

reply via email to

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