From 15e8208457ede81a46507288d7c91761a52962e0 Mon Sep 17 00:00:00 2001 From: goldsimon Date: Wed, 13 Jun 2007 19:00:21 +0000 Subject: [PATCH] pcb_new sets conn->err if protocol is not implemented -> netconn_new_..() does not allocate a new connection for unsupported protocols. --- CHANGELOG | 5 +++++ src/api/api_msg.c | 2 ++ 2 files changed, 7 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 94d428fa..f826cfb7 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -204,6 +204,11 @@ HISTORY ++ Bug fixes: + 2007-06-13 Simon Goldschmidt + * api_msg.c: pcb_new sets conn->err if protocol is not implemented + -> netconn_new_..() does not allocate a new connection for unsupported + protocols. + 2007-06-13 Frédéric Bernon, Simon Goldschmidt * api_lib.c: change return expression in netconn_addr and netconn_peer, because conn->err was reset to ERR_OK without any reasons (and error was lost)... diff --git a/src/api/api_msg.c b/src/api/api_msg.c index f3093bc8..8985e919 100644 --- a/src/api/api_msg.c +++ b/src/api/api_msg.c @@ -326,6 +326,8 @@ pcb_new(struct api_msg_msg *msg) break; #endif /* LWIP_TCP */ default: + /* Unsupported netconn type, e.g. protocol disabled */ + msg->conn->err = ERR_VAL; break; }