net/netlink/netlink_conn.c: Use nxsig_queue() instead of nxsig_kill() so that we can pass a reference to the connection structure with the signal.
This commit is contained in:
parent
e1e192fc33
commit
a8f3c3651a
|
@ -137,10 +137,21 @@ static void netlink_notify_waiters(FAR struct netlink_conn_s *conn)
|
|||
{
|
||||
if (conn->waiter[i] > 0)
|
||||
{
|
||||
ret = nxsig_kill(conn->waiter[i], CONFIG_NETLINK_SIGNAL);
|
||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
||||
union sigval value;
|
||||
|
||||
/* Send the CONFIG_NETLINK_SIGNAL signal to the waiter. */
|
||||
|
||||
value.sival_ptr = conn;
|
||||
ret = nxsig_queue((int)conn->waiter[i],
|
||||
(int)CONFIG_NETLINK_SIGNAL, value);
|
||||
#else
|
||||
ret = nxsig_queue((int)conn->waiter[i],
|
||||
(int)CONFIG_NETLINK_SIGNAL, conn);
|
||||
#endif
|
||||
if (ret < 0)
|
||||
{
|
||||
nerr("ERROR: nxsig_kill() failed: %d\n", ret);
|
||||
{
|
||||
nerr("ERROR: nxsig_queue() failed: %d\n", ret);
|
||||
UNUSED(ret);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue