summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2005-02-11 05:02:24 +0000
committerMarcel Holtmann <marcel@holtmann.org>2005-02-11 05:02:24 +0000
commit8aebcde5f68394bc2cd27855971d26ce52da0500 (patch)
tree17c749d479328b67c619a03050f6df62fc5aa1a5
parentd67817be8163beb8d69d97934eb998d269221a14 (diff)
Handle the valid bit of the clock offset
-rw-r--r--tools/hcitool.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/hcitool.c b/tools/hcitool.c
index 57d23e6a..766c084e 100644
--- a/tools/hcitool.c
+++ b/tools/hcitool.c
@@ -223,7 +223,7 @@ static void cmd_inq(int dev_id, int argc, char **argv)
for (i = 0; i < num_rsp; i++) {
ba2str(&(info+i)->bdaddr, addr);
printf("\t%s\tclock offset: 0x%4.4x\tclass: 0x%2.2x%2.2x%2.2x\n",
- addr, (info+i)->clock_offset,
+ addr, btohs((info+i)->clock_offset),
(info+i)->dev_class[2],
(info+i)->dev_class[1],
(info+i)->dev_class[0]);
@@ -302,7 +302,7 @@ static void cmd_scan(int dev_id, int argc, char **argv)
for (i = 0; i < num_rsp; i++) {
memset(name, 0, sizeof(name));
if (hci_read_remote_name_with_clock_offset(dd, &(info+i)->bdaddr,
- htobs((info+i)->clock_offset), sizeof(name), name, 100000) < 0)
+ (info+i)->clock_offset | 0x8000, sizeof(name), name, 100000) < 0)
strcpy(name, "n/a");
ba2str(&(info+i)->bdaddr, addr);
printf("\t%s\t%s\n", addr, name);