igmp_msg.c:mod check of IGMP_SCHEDMSG from assert to error log

Setting group->flags to IGMP_SCHEDMSG is a possible outcome, not unacceptable. If it occurs, an error log message will be reported

Signed-off-by: wangchen <wangchen41@xiaomi.com>
This commit is contained in:
wangchen 2024-09-09 15:36:34 +08:00 committed by Xiang Xiao
parent f10fc888fe
commit f03e4774a4

View file

@ -77,9 +77,15 @@ int igmp_schedmsg(FAR struct igmp_group_s *group, uint8_t msgid)
{
FAR struct net_driver_s *dev;
DEBUGASSERT(group != NULL && !IS_SCHEDMSG(group->flags));
DEBUGASSERT(group != NULL);
DEBUGASSERT(group->ifindex > 0);
if (IS_SCHEDMSG(group->flags))
{
nerr("ERROR: The group %u is busy\n", group->ifindex);
return -EBUSY;
}
/* Get the device instance associated with the interface index of the
* group
*/