Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit de922390 authored by Dmitry Shmidt's avatar Dmitry Shmidt
Browse files

libnl_2: Add nl_socket_set_cb() and nl_socket_get_cb()



Change-Id: Ibc2b4dc9528bd43d3fc85491c4838a33c916330e
Signed-off-by: default avatarDmitry Shmidt <dimitrysh@google.com>
parent 984410ae
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -127,3 +127,15 @@ int nl_socket_get_fd(struct nl_sock *sk)
{
	return sk->s_fd;
}

void nl_socket_set_cb(struct nl_sock *sk, struct nl_cb *cb)
{
	nl_cb_put(sk->s_cb);
	sk->s_cb = cb;
	nl_cb_get(cb);
}

struct nl_cb *nl_socket_get_cb(struct nl_sock *sk)
{
	return nl_cb_get(sk->s_cb);
}