sd-netlink: introduce netlink_get_reply_callback_count()
This commit is contained in:
@@ -107,5 +107,7 @@ int rtattr_read_nexthop(const struct rtnexthop *rtnh, size_t size, int family, O
|
||||
|
||||
void netlink_seal_message(sd_netlink *nl, sd_netlink_message *m);
|
||||
|
||||
size_t netlink_get_reply_callback_count(sd_netlink *nl);
|
||||
|
||||
/* TODO: to be exported later */
|
||||
int sd_netlink_sendv(sd_netlink *nl, sd_netlink_message **messages, size_t msgcnt, uint32_t **ret_serial);
|
||||
|
||||
@@ -458,6 +458,12 @@ static int timeout_compare(const void *a, const void *b) {
|
||||
return CMP(x->timeout, y->timeout);
|
||||
}
|
||||
|
||||
size_t netlink_get_reply_callback_count(sd_netlink *nl) {
|
||||
assert(nl);
|
||||
|
||||
return hashmap_size(nl->reply_callbacks);
|
||||
}
|
||||
|
||||
int sd_netlink_call_async(
|
||||
sd_netlink *nl,
|
||||
sd_netlink_slot **ret_slot,
|
||||
|
||||
Reference in New Issue
Block a user