adapter->bdaddr is set later in read_info_complete and current check always returns false. Check against bdaddr received in command response instead and fail if it is all zeros. --- src/adapter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/adapter.c b/src/adapter.c index 9ddd2fc..5165bed 100644 --- a/src/adapter.c +++ b/src/adapter.c @@ -5727,7 +5727,7 @@ static void read_info_complete(uint8_t status, uint16_t length, goto failed; } - if (bacmp(&adapter->bdaddr, BDADDR_ANY)) { + if (bacmp(&rp->bdaddr, BDADDR_ANY) == 0) { error("No Bluetooth address for index %u", adapter->dev_id); goto failed; } -- 1.8.1.1 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html