From 09c661966c31301ced89de93a97e9758a50fe071 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sun, 4 Jul 2010 03:43:20 +0200 Subject: [PATCH] dbus: implement GetAll() with empty interface string properly --- src/dbus.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/dbus.c b/src/dbus.c index 2c2a9cd6..3a6d79f3 100644 --- a/src/dbus.c +++ b/src/dbus.c @@ -1201,7 +1201,6 @@ DBusHandlerResult bus_default_message_handler(Manager *m, DBusConnection *c, DBu const char *interface; const BusProperty *p; DBusMessageIter iter, sub, sub2, sub3; - bool any = false; if (!dbus_message_get_args( message, @@ -1219,7 +1218,7 @@ DBusHandlerResult bus_default_message_handler(Manager *m, DBusConnection *c, DBu goto oom; for (p = properties; p->property; p++) { - if (!streq(p->interface, interface)) + if (interface[0] && !streq(p->interface, interface)) continue; if (!dbus_message_iter_open_container(&sub, DBUS_TYPE_DICT_ENTRY, NULL, &sub2) || @@ -1239,8 +1238,6 @@ DBusHandlerResult bus_default_message_handler(Manager *m, DBusConnection *c, DBu if (!dbus_message_iter_close_container(&sub2, &sub3) || !dbus_message_iter_close_container(&sub, &sub2)) goto oom; - - any = true; } if (!dbus_message_iter_close_container(&iter, &sub)) -- 2.39.5