mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-01-18 20:43:54 +08:00
[lwIP] Fix the wait queue initialization issue.
This commit is contained in:
parent
1b9e9a39ad
commit
11479e53bd
@ -410,8 +410,6 @@ lwip_tryget_socket(int s)
|
|||||||
return tryget_socket(s);
|
return tryget_socket(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Allocate a new socket for a given netconn.
|
* Allocate a new socket for a given netconn.
|
||||||
*
|
*
|
||||||
@ -443,6 +441,9 @@ alloc_socket(struct netconn *newconn, int accepted)
|
|||||||
sockets[i].sendevent = (NETCONNTYPE_GROUP(newconn->type) == NETCONN_TCP ? (accepted != 0) : 1);
|
sockets[i].sendevent = (NETCONNTYPE_GROUP(newconn->type) == NETCONN_TCP ? (accepted != 0) : 1);
|
||||||
sockets[i].errevent = 0;
|
sockets[i].errevent = 0;
|
||||||
sockets[i].err = 0;
|
sockets[i].err = 0;
|
||||||
|
#ifdef SAL_USING_POSIX
|
||||||
|
rt_wqueue_init(&sockets[i].wait_head);
|
||||||
|
#endif
|
||||||
return i + LWIP_SOCKET_OFFSET;
|
return i + LWIP_SOCKET_OFFSET;
|
||||||
}
|
}
|
||||||
SYS_ARCH_UNPROTECT(lev);
|
SYS_ARCH_UNPROTECT(lev);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user