diff --git a/client/main.c b/client/main.c
index a983066..506602b 100644
--- a/client/main.c
+++ b/client/main.c
static GDBusProxy *default_attr;
static GList *ctrl_list;
static GList *battery_proxies;
+static GList *admin_devices_proxies;
static const char *agent_arguments[] = {
"on",
adapter = find_ctrl(ctrl_list, g_dbus_proxy_get_path(proxy));
- if (!adapter)
+ if (!adapter) {
+ admin_devices_proxies = g_list_append(admin_devices_proxies,
+ proxy);
return;
+ }
admin_policy_set_status_proxy(proxy);
}
adapter = find_ctrl(ctrl_list, g_dbus_proxy_get_path(proxy));
- if (!adapter)
+ if (!adapter) {
+ admin_devices_proxies = g_list_remove(admin_devices_proxies,
+ proxy);
return;
+ }
admin_policy_set_status_proxy(NULL);
}
return NULL;
}
-static GDBusProxy *find_battery_by_path(GList *source, const char *path)
+static GDBusProxy *find_proxies_by_path(GList *source, const char *path)
{
GList *list;
static void cmd_info(int argc, char *argv[])
{
GDBusProxy *proxy;
+ GDBusProxy *admin_proxy;
GDBusProxy *battery_proxy;
DBusMessageIter iter;
const char *address;
print_property(proxy, "AdvertisingFlags");
print_property(proxy, "AdvertisingData");
- battery_proxy = find_battery_by_path(battery_proxies,
+ battery_proxy = find_proxies_by_path(battery_proxies,
+ g_dbus_proxy_get_path(proxy));
+ admin_proxy = find_proxies_by_path(admin_devices_proxies,
g_dbus_proxy_get_path(proxy));
print_property_with_label(battery_proxy, "Percentage",
"Battery Percentage");
+ print_property_with_label(admin_proxy, "AffectedByPolicy",
+ "Affected by Policy");
return bt_shell_noninteractive_quit(EXIT_SUCCESS);
}