pcb_new sets conn->err if protocol is not implemented -> netconn_new_..() does not allocate a new connection for unsupported protocols.

This commit is contained in:
goldsimon 2007-06-13 19:00:21 +00:00
parent d8fe18c28e
commit 15e8208457
2 changed files with 7 additions and 0 deletions

View File

@ -204,6 +204,11 @@ HISTORY
++ Bug fixes: ++ 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 2007-06-13 Frédéric Bernon, Simon Goldschmidt
* api_lib.c: change return expression in netconn_addr and netconn_peer, because * 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)... conn->err was reset to ERR_OK without any reasons (and error was lost)...

View File

@ -326,6 +326,8 @@ pcb_new(struct api_msg_msg *msg)
break; break;
#endif /* LWIP_TCP */ #endif /* LWIP_TCP */
default: default:
/* Unsupported netconn type, e.g. protocol disabled */
msg->conn->err = ERR_VAL;
break; break;
} }