diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2004-10-29 02:49:27 +0000 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2004-10-29 02:49:27 +0000 |
commit | e4f0eb0611d76862fecf7053ce55d423409d2ef3 (patch) | |
tree | 9eb03b1f85c4c49796510bbbf76b4086002c5a8e /test/rctest.c | |
parent | c29ecd6c660249eeaba7919f99eb79cf380e9fa6 (diff) |
Add support for setting link mode
Diffstat (limited to 'test/rctest.c')
-rw-r--r-- | test/rctest.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/test/rctest.c b/test/rctest.c index 4dcd4f3c..5fb5075c 100644 --- a/test/rctest.c +++ b/test/rctest.c @@ -150,23 +150,21 @@ void do_listen( void (*handler)(int sk) ) exit(1); } -#if 0 /* Set link mode */ opt = 0; if (master) - opt |= L2CAP_LM_MASTER; + opt |= RFCOMM_LM_MASTER; if (auth) - opt |= L2CAP_LM_AUTH; + opt |= RFCOMM_LM_AUTH; if (encrypt) - opt |= L2CAP_LM_ENCRYPT; + opt |= RFCOMM_LM_ENCRYPT; - if (setsockopt(s, SOL_RFCOMM, L2CAP_LM, &opt, sizeof(opt)) < 0) { + if (setsockopt(s, SOL_RFCOMM, RFCOMM_LM, &opt, sizeof(opt)) < 0) { syslog(LOG_ERR, "Can't set L2CAP link mode. %s(%d)", strerror(errno), errno); exit(1); } -#endif if( listen(s, 10) ) { syslog(LOG_ERR,"Can not listen on the socket. %s(%d)", strerror(errno), errno); |