mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-11-07 05:30:14 +00:00
Replace API programmation error checking for IGMP join/leave (ismulticast(addr)) by LWIP_ERROR checking.
This commit is contained in:
parent
f39b9c85fe
commit
c671f8e7ef
@ -340,10 +340,7 @@ igmp_joingroup(struct netif *ifp, struct ip_addr *groupaddr)
|
||||
struct igmp_group *group;
|
||||
|
||||
/* make sure it is multicast address */
|
||||
if (!ip_addr_ismulticast(groupaddr)) {
|
||||
LWIP_DEBUGF(IGMP_DEBUG, ("igmp_joingroup: attempt to join non-multicast address\n"));
|
||||
return ERR_VAL;
|
||||
}
|
||||
LWIP_ERROR("igmp_joingroup: attempt to join non-multicast address", ip_addr_ismulticast(groupaddr), return ERR_VAL;);
|
||||
|
||||
/* find group or create a new one if not found */
|
||||
group = igmp_lookup_group(ifp, groupaddr);
|
||||
@ -390,6 +387,10 @@ igmp_leavegroup(struct netif *ifp, struct ip_addr *groupaddr)
|
||||
{
|
||||
struct igmp_group *group;
|
||||
|
||||
/* make sure it is multicast address */
|
||||
LWIP_ERROR("igmp_leavegroup: attempt to leave non-multicast address", ip_addr_ismulticast(groupaddr), return ERR_VAL;);
|
||||
|
||||
/* find group */
|
||||
group = igmp_lookfor_group(ifp, groupaddr);
|
||||
|
||||
if (group != NULL) {
|
||||
|
Loading…
Reference in New Issue
Block a user