kopia lustrzana https://github.com/espressif/esp-idf
lwip: Fix bug with LWIP_SOCKET_OFFSET & IGMP group support
rodzic
48d9d507aa
commit
3f83914f7a
|
@ -3139,13 +3139,14 @@ static void lwip_socket_drop_registered_memberships(int s)
|
||||||
(default initialization is to 0) */
|
(default initialization is to 0) */
|
||||||
int sa = s + 1;
|
int sa = s + 1;
|
||||||
int i;
|
int i;
|
||||||
|
struct lwip_sock *sock = get_socket(s);
|
||||||
|
|
||||||
LWIP_ASSERT("socket has no netconn", sockets[s].conn != NULL);
|
LWIP_ASSERT("socket has no netconn", sock->conn != NULL);
|
||||||
|
|
||||||
for (i = 0; i < LWIP_SOCKET_MAX_MEMBERSHIPS; i++) {
|
for (i = 0; i < LWIP_SOCKET_MAX_MEMBERSHIPS; i++) {
|
||||||
if (socket_multicast_memberships[i].sa == sa) {
|
if (socket_multicast_memberships[i].sa == sa) {
|
||||||
socket_multicast_memberships[i].sa = 0;
|
socket_multicast_memberships[i].sa = 0;
|
||||||
netconn_join_leave_group(sockets[s].conn,
|
netconn_join_leave_group(sock->conn,
|
||||||
&socket_multicast_memberships[i].multi_addr,
|
&socket_multicast_memberships[i].multi_addr,
|
||||||
&socket_multicast_memberships[i].if_addr,
|
&socket_multicast_memberships[i].if_addr,
|
||||||
NETCONN_LEAVE);
|
NETCONN_LEAVE);
|
||||||
|
|
Ładowanie…
Reference in New Issue