Diff between 67f75bfa2de581982017df205ad3994b3f28bcde and 20b8449c026cc49f03c20d631f504e8a15eb0e74

Changed Files

File Additions Deletions Status
src/adapter.c +9 -0 modified

Full Patch

diff --git a/src/adapter.c b/src/adapter.c
index 7e4bbb6..2984d80 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -2806,6 +2806,15 @@ void adapter_update_found_devices(struct btd_adapter *adapter,
 	if (dev) {
 		adapter->oor_devices = g_slist_remove(adapter->oor_devices,
 							dev);
+
+		/* If an existing device had no name but the newly received EIR
+		 * data has (complete or not), we want to present it to the
+		 * user. */
+		if (dev->name == NULL && eir_data.name != NULL) {
+			dev->name = g_strdup(eir_data.name);
+			goto done;
+		}
+
 		if (dev->rssi != rssi)
 			goto done;