From 24df78bcbc87c243c09771d9c00ba2645b5849cb Mon Sep 17 00:00:00 2001 From: goldsimon Date: Tue, 20 Jan 2015 14:01:16 +0100 Subject: [PATCH] fixed that lwip_netconn_do_delconn() did not set msg->err on success (just introduced that bug this weekend...) --- src/api/api_msg.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/api/api_msg.c b/src/api/api_msg.c index 3528a461..b9db0fa9 100644 --- a/src/api/api_msg.c +++ b/src/api/api_msg.c @@ -842,7 +842,7 @@ void lwip_netconn_do_delconn(struct api_msg_msg *msg) { /* @todo TCP: abort running write/connect? */ - if ((msg->conn->state != NETCONN_NONE) && + if ((msg->conn->state != NETCONN_NONE) && (msg->conn->state != NETCONN_LISTEN) && (msg->conn->state != NETCONN_CONNECT)) { /* this only happens for TCP netconns */ @@ -852,6 +852,7 @@ lwip_netconn_do_delconn(struct api_msg_msg *msg) } else { LWIP_ASSERT("blocking connect in progress", (msg->conn->state != NETCONN_CONNECT) || IN_NONBLOCKING_CONNECT(msg->conn)); + msg->err = ERR_OK; /* Drain and delete mboxes */ netconn_drain(msg->conn);