From f267a12c348f15f7bf7792bc6b66314c898d1ded Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Tue, 19 Jun 2012 13:23:41 +0300 Subject: [PATCH] adapter: Change not-connected authorization error to a warning Due to scheduling/timing on some kernels it is possible that the device connected event through mgmt comes slightly after an L2CAP socket receives the same event. We should try to fix this on the kernel side but as this check in user space is not protecting against critical errors but just potential profile bugs it can be changed to a simple warning message. --- src/adapter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/adapter.c b/src/adapter.c index 6e04fafc5..f92287607 100644 --- a/src/adapter.c +++ b/src/adapter.c @@ -3112,7 +3112,7 @@ static int adapter_authorize(struct btd_adapter *adapter, const bdaddr_t *dst, /* Device connected? */ if (!g_slist_find(adapter->connections, device)) - return -ENOTCONN; + error("Authorization request for non-connected device!?"); if (adapter->auth_idle_id) return -EBUSY; -- 2.47.3