summaryrefslogtreecommitdiffstats
path: root/src/dbus-hci.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2009-01-27 15:34:28 +0200
committerJohan Hedberg <johan.hedberg@nokia.com>2009-01-27 15:34:28 +0200
commite7158358e0b780e08b64050033634263a635d001 (patch)
tree969fbe9f0f50c7cfea98200ca274707f6bae5756 /src/dbus-hci.c
parentb9ade4eeb6766ee263ce40fe456c03141bbb1f77 (diff)
Set the Alias only after checking the EIR data
Diffstat (limited to 'src/dbus-hci.c')
-rw-r--r--src/dbus-hci.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/dbus-hci.c b/src/dbus-hci.c
index 562e6652..8059478d 100644
--- a/src/dbus-hci.c
+++ b/src/dbus-hci.c
@@ -753,17 +753,6 @@ void hcid_dbus_inquiry_result(bdaddr_t *local, bdaddr_t *peer, uint32_t class,
create_name(filename, PATH_MAX, STORAGEDIR, local_addr, "names");
name = textfile_get(filename, peer_addr);
- if (!alias) {
- real_alias = NULL;
-
- if (!name) {
- alias = g_strdup(peer_addr);
- g_strdelimit(alias, ":", '-');
- } else
- alias = g_strdup(name);
- } else
- real_alias = alias;
-
tmp_name = extract_eir_name(data, &name_type);
if (tmp_name) {
if (name_type == 0x09) {
@@ -782,6 +771,17 @@ void hcid_dbus_inquiry_result(bdaddr_t *local, bdaddr_t *peer, uint32_t class,
}
}
+ if (!alias) {
+ real_alias = NULL;
+
+ if (!name) {
+ alias = g_strdup(peer_addr);
+ g_strdelimit(alias, ":", '-');
+ } else
+ alias = g_strdup(name);
+ } else
+ real_alias = alias;
+
path = adapter_get_path(adapter);
icon = class_to_icon(class);