summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorMax Krasnyansky <maxk@qualcomm.com>2002-09-12 02:00:37 +0000
committerMax Krasnyansky <maxk@qualcomm.com>2002-09-12 02:00:37 +0000
commit068ed1258ab388bfa6d554da9376375ecc673686 (patch)
tree1c964f5ad7e6e1e9b5e0161ff662c0908314780d /tools
parentf93bdd3e8438c165bc3ba98dc1730d2701f98bfc (diff)
channel must be uint8
Diffstat (limited to 'tools')
-rw-r--r--tools/rctest.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/rctest.c b/tools/rctest.c
index a3eefd6f..388195a7 100644
--- a/tools/rctest.c
+++ b/tools/rctest.c
@@ -66,7 +66,7 @@ long data_size = 127;
/* Default addr and channel */
bdaddr_t bdaddr;
-unsigned short channel = 10;
+uint8_t channel = 10;
int master = 0;
int auth = 0;
@@ -99,7 +99,7 @@ int do_connect(char *svr)
memset(&rem_addr, 0, sizeof(rem_addr));
rem_addr.rc_family = AF_BLUETOOTH;
baswap(&rem_addr.rc_bdaddr, strtoba(svr));
- rem_addr.rc_channel = htobs(channel);
+ rem_addr.rc_channel = channel;
if( connect(s, (struct sockaddr *)&rem_addr, sizeof(rem_addr)) < 0 ){
syslog(LOG_ERR, "Can't connect. %s(%d)", strerror(errno), errno);
close(s);
@@ -124,7 +124,7 @@ void do_listen( void (*handler)(int sk) )
loc_addr.rc_family = AF_BLUETOOTH;
loc_addr.rc_bdaddr = bdaddr;
- loc_addr.rc_channel = htobs(channel);
+ loc_addr.rc_channel = channel;
if( bind(s, (struct sockaddr *) &loc_addr, sizeof(loc_addr)) < 0 ) {
syslog(LOG_ERR, "Can't bind socket. %s(%d)", strerror(errno), errno);
exit(1);