mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2025-08-04 21:44:38 +08:00
altcp: default shutdown for both sides is close
This commit is contained in:
parent
d66c0e3381
commit
a7b43dae49
@ -471,8 +471,14 @@ altcp_default_bind(struct altcp_pcb *conn, const ip_addr_t *ipaddr, u16_t port)
|
|||||||
err_t
|
err_t
|
||||||
altcp_default_shutdown(struct altcp_pcb *conn, int shut_rx, int shut_tx)
|
altcp_default_shutdown(struct altcp_pcb *conn, int shut_rx, int shut_tx)
|
||||||
{
|
{
|
||||||
if (conn && conn->inner_conn) {
|
if (conn) {
|
||||||
return altcp_shutdown(conn->inner_conn, shut_rx, shut_tx);
|
if (shut_rx && shut_tx && conn->fns && conn->fns->close) {
|
||||||
|
/* default shutdown for both sides is close */
|
||||||
|
return conn->fns->close(conn);
|
||||||
|
}
|
||||||
|
if (conn->inner_conn) {
|
||||||
|
return altcp_shutdown(conn->inner_conn, shut_rx, shut_tx);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return ERR_VAL;
|
return ERR_VAL;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user