mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-07-07 21:38:50 +00:00
fixed bug #37052: "netconn_alloc: undefined netconn_type" assertion skipped
This commit is contained in:
parent
847845027f
commit
a070751061
|
@ -579,10 +579,7 @@ netconn_alloc(enum netconn_type t, netconn_callback callback)
|
||||||
conn->type = t;
|
conn->type = t;
|
||||||
conn->pcb.tcp = NULL;
|
conn->pcb.tcp = NULL;
|
||||||
|
|
||||||
#if (DEFAULT_RAW_RECVMBOX_SIZE == DEFAULT_UDP_RECVMBOX_SIZE) && \
|
/* If all sizes are the same, every compiler should optimize this switch to nothing, */
|
||||||
(DEFAULT_RAW_RECVMBOX_SIZE == DEFAULT_TCP_RECVMBOX_SIZE)
|
|
||||||
size = DEFAULT_RAW_RECVMBOX_SIZE;
|
|
||||||
#else
|
|
||||||
switch(NETCONNTYPE_GROUP(t)) {
|
switch(NETCONNTYPE_GROUP(t)) {
|
||||||
#if LWIP_RAW
|
#if LWIP_RAW
|
||||||
case NETCONN_RAW:
|
case NETCONN_RAW:
|
||||||
|
@ -603,7 +600,6 @@ netconn_alloc(enum netconn_type t, netconn_callback callback)
|
||||||
LWIP_ASSERT("netconn_alloc: undefined netconn_type", 0);
|
LWIP_ASSERT("netconn_alloc: undefined netconn_type", 0);
|
||||||
goto free_and_return;
|
goto free_and_return;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
if (sys_sem_new(&conn->op_completed, 0) != ERR_OK) {
|
if (sys_sem_new(&conn->op_completed, 0) != ERR_OK) {
|
||||||
goto free_and_return;
|
goto free_and_return;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user