From 97f797e8595b0e1c0a87fbb0235f96d493183b56 Mon Sep 17 00:00:00 2001 From: goldsimon Date: Thu, 14 Jan 2010 19:49:27 +0000 Subject: [PATCH] do_connect(): set conn->err to an error if conn->pcb is NULL --- src/api/api_msg.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/api/api_msg.c b/src/api/api_msg.c index bc432203..009facef 100644 --- a/src/api/api_msg.c +++ b/src/api/api_msg.c @@ -836,6 +836,8 @@ void do_connect(struct api_msg_msg *msg) { if (msg->conn->pcb.tcp == NULL) { + /* This may happen when calling netconn_connect() a second time */ + msg->conn->err = ERR_CLSD; sys_sem_signal(msg->conn->op_completed); return; }