lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [bug #64998] repeated call of setup_tcp() for TCP connect


From: quanjia
Subject: [lwip-devel] [bug #64998] repeated call of setup_tcp() for TCP connect
Date: Thu, 7 Dec 2023 20:57:53 -0500 (EST)

URL:
  <https://savannah.nongnu.org/bugs/?64998>

                 Summary: repeated call of setup_tcp() for TCP connect
                   Group: lwIP - A Lightweight TCP/IP stack
               Submitter: quanjia
               Submitted: Fri 08 Dec 2023 01:57:51 AM UTC
                Category: TCP
                Severity: 3 - Normal
              Item Group: Faulty Behaviour
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None
            lwIP version: git head


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Fri 08 Dec 2023 01:57:51 AM UTC By: quanjia <quanjia>
In lwip_netconn_do_connect() it call setup_tcp() before tcp_connect(), but in
lwip_netconn_do_connected() it calls setup_tcp() again for TCP, this seems
unnecesary, or did I miss something?

lwip_netconn_do_connect(void *m)
{
  ...
  ...
      case NETCONN_TCP:
          ...
          setup_tcp(msg->conn); <---- first calls setup_tcp here!
          err = tcp_connect(msg->conn->pcb.tcp,
API_EXPR_REF(msg->msg.bc.ipaddr),
                            msg->msg.bc.port, lwip_netconn_do_connected);
                                                        
  ...
}

lwip_netconn_do_connected(void *arg, struct tcp_pcb *pcb, err_t err)
{
  ...
  if ((NETCONNTYPE_GROUP(conn->type) == NETCONN_TCP) && (err == ERR_OK)) {
    setup_tcp(conn);  <---- on successfully connected, setup_tcp is called
again, is necessary?
  }
  ...
}








    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/bugs/?64998>

_______________________________________________
Message sent via Savannah
https://savannah.nongnu.org/




reply via email to

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