This is an automated email from the ASF dual-hosted git repository.
gnutt pushed a commit to branch pr479
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
The following commit(s) were added to refs/heads/pr479 by this push:
new b2ff8ab net: phy_notify_subscribe call phy_notify_unsubscribe if
sigev_notify equals SIGEV_NONE
b2ff8ab is described below
commit b2ff8ab95f239c2c207ced1763f23ca9d258162e
Author: Xiang Xiao <[email protected]>
AuthorDate: Sun Mar 8 01:07:26 2020 +0800
net: phy_notify_subscribe call phy_notify_unsubscribe if sigev_notify
equals SIGEV_NONE
Signed-off-by: Xiang Xiao <[email protected]>
Change-Id: I9fedc77a03f8c697566dc6a216201a3e58a0d944
---
drivers/net/phy_notify.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/net/phy_notify.c b/drivers/net/phy_notify.c
index 7d6abb8..75c9e8f 100644
--- a/drivers/net/phy_notify.c
+++ b/drivers/net/phy_notify.c
@@ -290,6 +290,13 @@ int phy_notify_subscribe(FAR const char *intf, pid_t pid,
phyinfo("Actual PID=%d\n", pid);
}
+ /* Unsubscribe if sigev_notify field equals SIGEV_NONE */
+
+ if (event->sigev_notify == SIGEV_NONE)
+ {
+ return phy_notify_unsubscribe(intf, pid);
+ }
+
/* Check if this client already exists */
client = phy_find_assigned(intf, pid);