This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new f03e4774a49 igmp_msg.c:mod check of IGMP_SCHEDMSG from assert to error
log
f03e4774a49 is described below
commit f03e4774a49935ca6a5f3ab55ca874baa56ea7b0
Author: wangchen <[email protected]>
AuthorDate: Mon Sep 9 15:36:34 2024 +0800
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 <[email protected]>
---
net/igmp/igmp_msg.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/net/igmp/igmp_msg.c b/net/igmp/igmp_msg.c
index ccade2db6c2..9d46c3d70c4 100644
--- a/net/igmp/igmp_msg.c
+++ b/net/igmp/igmp_msg.c
@@ -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
*/