summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2008-07-11 03:00:37 +0000
committerMarcel Holtmann <marcel@holtmann.org>2008-07-11 03:00:37 +0000
commit93f86d24ccd3e1a589a2762e1a424cf7cc70e740 (patch)
treecd108c729c078d0fca24039bc7e53a4dd49eb6a9 /test
parent50ef5513db1ddcfa1e0bf704fe79cc8e30964cd2 (diff)
Make sure to actually set the link mode option
Diffstat (limited to 'test')
-rw-r--r--test/rctest.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/rctest.c b/test/rctest.c
index 2da87f71..08620d4e 100644
--- a/test/rctest.c
+++ b/test/rctest.c
@@ -148,6 +148,12 @@ static int do_connect(char *svr)
if (secure)
opt |= RFCOMM_LM_SECURE;
+ if (opt && setsockopt(sk, SOL_RFCOMM, RFCOMM_LM, &opt, sizeof(opt)) < 0) {
+ syslog(LOG_ERR, "Can't set RFCOMM link mode: %s (%d)",
+ strerror(errno), errno);
+ goto error;
+ }
+
/* Connect to remote device */
memset(&addr, 0, sizeof(addr));
addr.rc_family = AF_BLUETOOTH;