summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2006-01-18 17:45:51 +0000
committerMarcel Holtmann <marcel@holtmann.org>2006-01-18 17:45:51 +0000
commitda7aed3f3f9377f68a7aebe645ef4e8b1f6f1d92 (patch)
tree87f19a03ccc7d0396317603c16ec2d5428aaa313 /tools
parentd9787e55f6d5153ed7825022297f51a9442434ee (diff)
Use the correct device for reading the local clock
Diffstat (limited to 'tools')
-rw-r--r--tools/hcitool.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/hcitool.c b/tools/hcitool.c
index 85404afc..2ad26bfe 100644
--- a/tools/hcitool.c
+++ b/tools/hcitool.c
@@ -1973,7 +1973,7 @@ static void cmd_clock(int dev_id, int argc, char **argv)
else
bacpy(&bdaddr, BDADDR_ANY);
- if (!bacmp(&bdaddr, BDADDR_ANY))
+ if (dev_id < 0 && !bacmp(&bdaddr, BDADDR_ANY))
dev_id = hci_get_route(NULL);
if (dev_id < 0) {