summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorStephen Crane <steve.crane@rococosoft.com>2003-04-08 13:34:39 +0000
committerStephen Crane <steve.crane@rococosoft.com>2003-04-08 13:34:39 +0000
commit723681ffa3035a55fe3a293add7e26da0e7296bd (patch)
treed80ffd0dba4323f47d2291ce2468aab7a2696f98 /tools
parent1c341784341174627ca3d8a76a4a2ca3bde2713b (diff)
use constants; report errors
Diffstat (limited to 'tools')
-rw-r--r--tools/hcitool.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/tools/hcitool.c b/tools/hcitool.c
index 00c84b05..f2ffb891 100644
--- a/tools/hcitool.c
+++ b/tools/hcitool.c
@@ -428,7 +428,7 @@ static void cmd_info(int dev_id, int argc, char **argv)
}
if (cc) {
- if (hci_create_connection(dd, &bdaddr, 0x0008 | 0x0010, 0, 0, &handle, 25000) < 0) {
+ if (hci_create_connection(dd, &bdaddr, HCI_DM1 | HCI_DH1, 0, 0, &handle, 25000) < 0) {
perror("Can't create connection");
close(dd);
exit(1);
@@ -467,7 +467,7 @@ static void cmd_info(int dev_id, int argc, char **argv)
}
if (cc)
- hci_disconnect(dd, handle, 0x13, 10000);
+ hci_disconnect(dd, handle, HCI_OE_USER_ENDED_CONNECTION, 10000);
close(dd);
}
@@ -655,7 +655,8 @@ static void cmd_cc(int dev_id, int argc, char **argv)
exit(1);
}
- hci_create_connection(dd, &bdaddr, ptype, 0, role, &handle, 1000);
+ if (0 > hci_create_connection(dd, &bdaddr, ptype, 0, role, &handle, 1000))
+ perror("Can't create connection");
hci_close_dev(dd);
}
@@ -718,7 +719,8 @@ static void cmd_dc(int dev_id, int argc, char **argv)
exit(1);
}
- hci_disconnect(dd, cr->conn_info->handle, 0x13, 100);
+ if (0 > hci_disconnect(dd, cr->conn_info->handle, HCI_OE_USER_ENDED_CONNECTION, 100))
+ perror("Disconnect failed");
close(dd);
free(cr);