Use udp_get_multicast_ttl/udp_set_multicast_ttl accessors where applicable

This commit is contained in:
Dirk Ziegelmeier
2016-08-16 08:08:06 +02:00
parent af48bec63c
commit c61c8f3766
2 changed files with 4 additions and 4 deletions

View File

@@ -2019,7 +2019,7 @@ lwip_getsockopt_impl(int s, int level, int optname, void *optval, socklen_t *opt
if (NETCONNTYPE_GROUP(netconn_type(sock->conn)) != NETCONN_UDP) {
return ENOPROTOOPT;
}
*(u8_t*)optval = sock->conn->pcb.udp->mcast_ttl;
*(u8_t*)optval = udp_get_multicast_ttl(sock->conn->pcb.udp);
LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_getsockopt(%d, IPPROTO_IP, IP_MULTICAST_TTL) = %d\n",
s, *(int *)optval));
break;
@@ -2386,7 +2386,7 @@ lwip_setsockopt_impl(int s, int level, int optname, const void *optval, socklen_
#if LWIP_MULTICAST_TX_OPTIONS
case IP_MULTICAST_TTL:
LWIP_SOCKOPT_CHECK_OPTLEN_CONN_PCB_TYPE(sock, optlen, u8_t, NETCONN_UDP);
sock->conn->pcb.udp->mcast_ttl = (u8_t)(*(const u8_t*)optval);
udp_set_multicast_ttl(sock->conn->pcb.udp, (u8_t)(*(const u8_t*)optval));
break;
case IP_MULTICAST_IF:
{