From 01e8a8b87a52dcf23277a31895e0da2259242728 Mon Sep 17 00:00:00 2001 From: Mateusz Lemusisk Date: Sun, 21 Jun 2015 17:08:52 +0200 Subject: [PATCH] client: Display address if calling 'disconnect' without arguments Before: [PHILIPS BTM2180]# disconnect Attempting to disconnect from Successful disconnected After: [PHILIPS BTM2180]# disconnect Attempting to disconnect from XX:XX:XX:XX:XX:XX Successful disconnected --- client/main.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/client/main.c b/client/main.c index 41e95b2b4..68635931b 100644 --- a/client/main.c +++ b/client/main.c @@ -1421,7 +1421,12 @@ static void cmd_disconn(const char *arg) rl_printf("Failed to disconnect\n"); return; } + if (strlen(arg) == 0) { + DBusMessageIter iter; + if (g_dbus_proxy_get_property(proxy, "Address", &iter) == TRUE) + dbus_message_iter_get_basic(&iter, &arg); + } rl_printf("Attempting to disconnect from %s\n", arg); } -- 2.47.3