lwIP - A Lightweight TCP/IP stack - Bugs: bug #64998, repeated call of setup_tcp() for...
You are not allowed to post comments on this tracker with your current authentication level.
bug #64998: repeated call of setup_tcp() for TCP connect
Submitter: | quanjia <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 | Planned Release: | None |
lwIP version: | git head |
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
Carbon-Copy List
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
No changes have been made to this item
Powered by Savane 3.13-caa5.
Corresponding source code
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?
}
...
}