summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2003-02-12 15:53:40 +0000
committerMarcel Holtmann <marcel@holtmann.org>2003-02-12 15:53:40 +0000
commitae072dcf83d8124e45a0bf5ca69c3699e2a4b8fe (patch)
tree72d00206441b55b4ec432d44493fcc788dbcd620
parent047f07b46aa8afabe5ebd67fa02365c92a4ff224 (diff)
Fix the voice command for big endian machines
-rw-r--r--tools/hciconfig.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/hciconfig.c b/tools/hciconfig.c
index ed8fdcd2..9f80f4c4 100644
--- a/tools/hciconfig.c
+++ b/tools/hciconfig.c
@@ -535,7 +535,7 @@ void cmd_voice(int ctl, int hdev, char *opt)
exit(1);
}
if (opt) {
- uint16_t vs = htobl(strtoul(opt, NULL, 16));
+ uint16_t vs = htobs(strtoul(opt, NULL, 16));
if (0 > hci_write_voice_setting(s, vs, 1000)) {
printf("Can't write voice setting on hci%d. %s(%d)\n",
hdev, strerror(errno), errno);
@@ -549,6 +549,7 @@ void cmd_voice(int ctl, int hdev, char *opt)
hdev, strerror(errno), errno);
exit(1);
}
+ vs = htobs(vs);
ic = (vs & 0x0300) >> 8;
print_dev_hdr(&di);
printf("\tVoice setting: 0x%04x%s\n", vs,