3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-22 13:02:44 +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:
Denis Kenzior 2018-09-14 02:55:49 -05:00
parent b8d45a440a
commit ad13680420

View File

@ -401,7 +401,7 @@ struct l_queue *proxy_interface_find_all(const char *interface,
const struct l_queue_entry *entry;
struct l_queue *match = NULL;
if (!interface || !function)
if (!interface)
return NULL;
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))
continue;
if (!function(proxy->data, value))
if (function && !function(proxy->data, value))
continue;
if (!match)