Merge pull request #1760 from RT-Thread/fix_lwip_wq

[lwIP] Fix the wait queue initialization issue.
This commit is contained in:
Bernard Xiong 2018-09-01 15:25:06 +08:00 committed by GitHub
commit 5251ab737f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -410,8 +410,6 @@ lwip_tryget_socket(int s)
return tryget_socket(s);
}
/**
* 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].errevent = 0;
sockets[i].err = 0;
#ifdef SAL_USING_POSIX
rt_wqueue_init(&sockets[i].wait_head);
#endif
return i + LWIP_SOCKET_OFFSET;
}
SYS_ARCH_UNPROTECT(lev);