Skip to contentSkip to conversation

neard: Set device name in cache

PATCH Applied Frédéric Danis 2 participants 2 messages Nov 7, 2012 – Nov 13, 2012 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 neard: Set device name in cache

If device existed previously, it has been removed before calling of btd_event_remote_name(), so this just update storage cache and name property change of device object is not emitted.

---
 plugins/neard.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
plugins/neard.c +3 -2
index 8018977..8f8381c 100644
@@ -42,6 +42,7 @@
 #include "storage.h"
 #include "agent.h"
 #include "hcid.h"
+#include "event.h"
 
 #define NEARD_NAME "org.neard"
 #define NEARD_PATH "/"
@@ -293,8 +294,8 @@ static int process_eir(struct btd_adapter *adapter, uint8_t *eir, size_t size,
 
 	/* TODO handle incomplete name? */
 	if (eir_data.name)
-		write_device_name(adapter_get_address(adapter), &eir_data.addr,
-						BDADDR_BREDR, eir_data.name);
+		btd_event_remote_name(adapter_get_address(adapter),
+					&eir_data.addr, eir_data.name);
 
 	if (eir_data.hash)
 		btd_adapter_add_remote_oob_data(adapter, &eir_data.addr,
Signature · 1 line
1.7.9.5
#1 lore raw

Hi Frederic,

Quoted 6 lines · Frédéric Danis

If device existed previously, it has been removed before calling of btd_event_remote_name(), so this just update storage cache and name property change of device object is not emitted.

---
 plugins/neard.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Applied. Thanks.

Johan