Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp740744pxb; Wed, 25 Aug 2021 13:59:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxINGnR4nf4J7/Rk+VqzyWiCjOzf0v4rRwFCgJDEMCRtlUdCzQjmflJ55JHyydDXMHNhEJ7 X-Received: by 2002:a92:cf08:: with SMTP id c8mr206501ilo.246.1629925164234; Wed, 25 Aug 2021 13:59:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629925164; cv=none; d=google.com; s=arc-20160816; b=ZpFNeKX1MIIKJOVfXrh3Wv+dEK0c02eeBblu+ukxi6e7yZnzFUEOHJcbf3mtwkIunR IsE2caSYa/S2c3SAhFhtRpGusE/sFBt5V1SqvkiF4A4Eyrx3p5EXelnCEhP49ZtHskAX sl8BIhMvDIcj6gxAwOgT0cXZbY1pFz3RlQVd3y2RvNdCKjCTG6ymiefZ3DE0RdEiSYFq AT9gRXev4nxvNNVR0vyRRd3AwGbPXdWGsgHCkpfp015KY2MXKeiELGk/VqInR7Xp7OBO DZFVHKY1r0VviK1icv1OAUDKoLaWS6ziS2eu612JfUlANMUs6PfmY9giMkkCKIKa7MbC whrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=7fyuXHhY2+Pw+Tm9J6AbhvkKGLC+kylcUbFbwLzUBhI=; b=UI9QTUrGFn47yQZjTtoPY9lT+AC/Q4G0UyeNaKe2lJFe3nXuXqPdf6auNArW5nOUba xNeV8C3/CeJ42WDwBEDIw9JtJxEMJ5+8EATZg9ns3lXZVHscSpKPFa110gz18EDliwow kx6R+WTQgtIhvT3wOLXNTWQak4zIXbWMHzBLXSNhoA0tAvPQNEM7QarB4IrSSNqRoeeu U4r8oD2rZYLzSlytxb92O03Fw1M4PzBSbG5GBTq3TuQ9IYnShaXVB+m3QJFBoUtHgJZj TK/e6070fVi36g2PEH3fooeYLD21eIcPf3k0IvSrP8JdRQQmwaYjOh0lNDrFiNjAZ9Mw LCnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@lechnology.com header.s=default header.b=f8FfYny3; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ay23si964119iob.33.2021.08.25.13.58.13; Wed, 25 Aug 2021 13:59:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@lechnology.com header.s=default header.b=f8FfYny3; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231743AbhHYQwr (ORCPT + 99 others); Wed, 25 Aug 2021 12:52:47 -0400 Received: from vern.gendns.com ([98.142.107.122]:36502 "EHLO vern.gendns.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229791AbhHYQwr (ORCPT ); Wed, 25 Aug 2021 12:52:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lechnology.com; s=default; h=Content-Transfer-Encoding:MIME-Version: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=7fyuXHhY2+Pw+Tm9J6AbhvkKGLC+kylcUbFbwLzUBhI=; b=f8FfYny3Lva5KeyKF4GlwQ4xaX 7K9xEwnxEPBi6F9daEHSenJ10SxVVyF6ezJveuQFmQhESQubVJWZdX7nifqvKF59WSzYxIqreQfD6 R+3ErKOfWUlAQjjcvHZb2W+U3F/YGIdxL5lQfS0Z84O+GXifiqWzcybncGSs4r5fs01PFfxG+W93M I5fQaT5Zw3AKITsDRqEY0Q0zUXDQCXx/lMaAyjqxP7kDWxLH3S91erT90COW0eimz1RW6mNQ/vTXB t2dBdE5gBAGc5+37Na1CxpcbpAJH5c5cfM2pPYvgo2pjFKguWIxTrVXeL45YW8guOyjNvRjOLoFtE o6dFCFEA==; Received: from [2600:1700:4830:1658::fb2] (port=60238 helo=freyr.lechnology.com) by vern.gendns.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1mIw7x-0006LP-VT; Wed, 25 Aug 2021 12:51:58 -0400 From: David Lechner To: linux-bluetooth@vger.kernel.org Cc: David Lechner Subject: [PATCH BlueZ v2 0/2] device: fix advertising data UUIDs ignored when Cache = yes Date: Wed, 25 Aug 2021 11:51:23 -0500 Message-Id: <20210825165125.2675544-1-david@lechnology.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vern.gendns.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lechnology.com X-Get-Message-Sender-Via: vern.gendns.com: authenticated_id: davidmain+lechnology.com/only user confirmed/virtual account not confirmed X-Authenticated-Sender: vern.gendns.com: davidmain@lechnology.com X-Source: X-Source-Args: X-Source-Dir: Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org When [GATT] Cache = yes is set in configuration BlueZ does not use cached UUIDs for the list of service UUIDs. However, it doesn't clear the in-memory list of UUIDs received from advertising data, so when a device is scanned, connected and disconnected, the internal state still reflects that the UUIDs from the advertising data have already been handled. device_add_eir_uuids() ignored the UUIDs from the advertising data because both dev->le_state.svc_resolved == true and dev->eir_uuids still contains the UUIDs from the previous scan session. v2 changes: * split into two patches * always clear eir_uuids list on disconnect * move le_state.svc_resolved = false to gatt_cache_cleanup() Issue: https://github.com/bluez/bluez/issues/192 David Lechner (2): device: clear eir_uuids list on disconnect device: set le_state.svc_resolved = false in gatt_cache_cleanup() src/device.c | 4 ++++ 1 file changed, 4 insertions(+) -- 2.25.1