From 3524d98e35685875e95daee7fa86a9c2178264a4 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Sun, 23 Jan 2005 19:46:10 +0000 Subject: Only set link mode when needed --- test/rctest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/rctest.c') diff --git a/test/rctest.c b/test/rctest.c index b7916a34..8298ab07 100644 --- a/test/rctest.c +++ b/test/rctest.c @@ -164,7 +164,7 @@ static void do_listen(void (*handler)(int sk)) if (secure) opt |= RFCOMM_LM_SECURE; - if (setsockopt(s, SOL_RFCOMM, RFCOMM_LM, &opt, sizeof(opt)) < 0) { + if (opt && setsockopt(s, SOL_RFCOMM, RFCOMM_LM, &opt, sizeof(opt)) < 0) { syslog(LOG_ERR, "Can't set RFCOMM link mode: %s (%d)", strerror(errno), errno); exit(1); } -- cgit