summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/rctest.c4
-rw-r--r--test/scotest.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/test/rctest.c b/test/rctest.c
index 2ffb47dd..31d2be0f 100644
--- a/test/rctest.c
+++ b/test/rctest.c
@@ -128,7 +128,7 @@ int do_connect(char *svr)
memset(&conn, 0, sizeof(conn));
opt = sizeof(conn);
- if (getsockopt(s, SOL_L2CAP, RFCOMM_CONNINFO, &conn, &opt) < 0) {
+ if (getsockopt(s, SOL_RFCOMM, RFCOMM_CONNINFO, &conn, &opt) < 0) {
syslog(LOG_ERR, "Can't get RFCOMM connection information. %s(%d)", strerror(errno), errno);
close(s);
//return -1;
@@ -172,7 +172,7 @@ void do_listen( void (*handler)(int sk) )
opt |= RFCOMM_LM_SECURE;
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);
+ syslog(LOG_ERR, "Can't set RFCOMM link mode. %s(%d)", strerror(errno), errno);
exit(1);
}
diff --git a/test/scotest.c b/test/scotest.c
index 0c1ec130..eddd79af 100644
--- a/test/scotest.c
+++ b/test/scotest.c
@@ -101,7 +101,7 @@ static int do_connect(char *svr)
memset(&conn, 0, sizeof(conn));
opt = sizeof(conn);
- if (getsockopt(s, SOL_L2CAP, SCO_CONNINFO, &conn, &opt) < 0) {
+ if (getsockopt(s, SOL_SCO, SCO_CONNINFO, &conn, &opt) < 0) {
syslog(LOG_ERR, "Can't get SCO connection information. %s(%d)", strerror(errno), errno);
close(s);
return -1;