mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-22 21:22:37 +01:00
client: dbus-proxy: Relax requirements for find_all
If the function is not provided, assume that we want to match all proxies of a given interface.
This commit is contained in:
parent
b8d45a440a
commit
ad13680420
@ -401,7 +401,7 @@ struct l_queue *proxy_interface_find_all(const char *interface,
|
|||||||
const struct l_queue_entry *entry;
|
const struct l_queue_entry *entry;
|
||||||
struct l_queue *match = NULL;
|
struct l_queue *match = NULL;
|
||||||
|
|
||||||
if (!interface || !function)
|
if (!interface)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
for (entry = l_queue_get_entries(proxy_interfaces); entry;
|
for (entry = l_queue_get_entries(proxy_interfaces); entry;
|
||||||
@ -411,7 +411,7 @@ struct l_queue *proxy_interface_find_all(const char *interface,
|
|||||||
if (!interface_match_by_type_name(proxy->type, interface))
|
if (!interface_match_by_type_name(proxy->type, interface))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (!function(proxy->data, value))
|
if (function && !function(proxy->data, value))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (!match)
|
if (!match)
|
||||||
|
Loading…
Reference in New Issue
Block a user