From ad1368042045ebe24475e530ea424c3a4dc02706 Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Fri, 14 Sep 2018 02:55:49 -0500 Subject: [PATCH] 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. --- client/dbus-proxy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/dbus-proxy.c b/client/dbus-proxy.c index c68207c0..74e1264a 100644 --- a/client/dbus-proxy.c +++ b/client/dbus-proxy.c @@ -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)