Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp582338pxb; Wed, 25 Aug 2021 09:57:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyXvoI/3LUB0FUUtyQBF+M5v+EzbR67txCQdkZDepE0VTHwG2l6Bqromj9DhAG/LGR2Il+3 X-Received: by 2002:a17:906:504:: with SMTP id j4mr46070414eja.245.1629910633767; Wed, 25 Aug 2021 09:57:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629910633; cv=none; d=google.com; s=arc-20160816; b=qtWnrtAjQTnr301YlOi5BYxlyQxTV8SsBaZxk+m9sjgywJQeSPxBrhpmp+fvrDUsLV BZJZWEcx9uZ3lePQhfWYnIZXkVula1hTaKIG2jeogbdAbQcMgoodjKH7v9lOy/Z9TTlf 8lWf85IynDTc6H7pziaN8Fr8AJpu08EBFkSVaaFUbXXrhLoSyoYW50B3RMCwWb7Z9QF0 HwYpBbJMCTOwQAzaMfOLJCk5be+GaGlqa+OwOm7FhE3ZZI7591X0dRAS/TAKfyz+OJ+U pwu85FdqCvPUW6LIXGm5OnR+TdYT4QsV8uLrivAtAxf5qRc/tCtym0v9FMQD8mfAs6Ma 0UtQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=i2sewKx1DejS4NgnSR4JcbA3dG8ziSGJVQAwDkdnnQc=; b=S+I0QYMT8CTPsi2S2NxHUVv7wbqizPeZbmz4fMQBfJ5sa4dVkfXSk4po4TnmFvzkTy T6Fzy/kipYvHqrljsSE+tWt1ArJGtcxnKAVVcTr/87NsAmzqmiLStLPbC7v/Dn89hpR6 45Un4HU7Ir4vw8lOn/NPetLTHjQbOrxVd5g3rO/yzfh18rxumvEsWjhbG3GdRsUAUbFR maFn6jgpt8TqWGaz83mRyEjEB3cg4Sv905BVJa/cnYXOJdva3wQpVWn4INV07dYij1iw K00wKEsZVDPa8MBButhQ2Tx2nWbEk1kyBIpYxNFIQcVHrUvGt3tdTAmTJ4I8yibO/Ebl hpqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@lechnology.com header.s=default header.b=CTE1HsPt; 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 bu1si217150ejb.482.2021.08.25.09.56.48; Wed, 25 Aug 2021 09:57:13 -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=CTE1HsPt; 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 S230363AbhHYQws (ORCPT + 99 others); Wed, 25 Aug 2021 12:52:48 -0400 Received: from vern.gendns.com ([98.142.107.122]:36506 "EHLO vern.gendns.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230490AbhHYQwr (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: References:In-Reply-To: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:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=i2sewKx1DejS4NgnSR4JcbA3dG8ziSGJVQAwDkdnnQc=; b=CTE1HsPt53sZZUAtSrKLLre+Ia diXyjU/1GJe6fpH1AX4EeQWiTGIpYtELuR36q6p+yHrv7eDIvU0HA3RPqw2kfZUYnpzSKjJNi47RP x0/FQZXdJzWnrC5Znw2e8nZLFifMuKvUqDQTbkpZn8L2SHnAuF/pLbhRhVhoouIBuESrpnrgNMgip mY6HTw0V61p9NfewDbGJVtBF3d39f0fEct1W9A9+qoF3gBx80LXnDv4IONxFbasNldBKWKBAJzlub vnfSuU1Y0zD60MRoIChRiCc4/78ohrZBvIi1HICqf/wcJkocnn2STsgEuTUxPvI6ZfpvQDnNb/QO3 9MtU4C3g==; 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 1mIw7z-0006LP-5N; Wed, 25 Aug 2021 12:51:59 -0400 From: David Lechner To: linux-bluetooth@vger.kernel.org Cc: David Lechner , Luiz Augusto von Dentz Subject: [PATCH BlueZ v2 2/2] device: set le_state.svc_resolved = false in gatt_cache_cleanup() Date: Wed, 25 Aug 2021 11:51:25 -0500 Message-Id: <20210825165125.2675544-3-david@lechnology.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210825165125.2675544-1-david@lechnology.com> References: <20210825165125.2675544-1-david@lechnology.com> 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 the GATT cache is cleared, there is no longer a list of GATT services, so we need to set le_state.svc_resolved = false so that the next time the device connects, it will enumerate the services again. This partially fixes an issue where the UUIDs D-Bus property was empty after scanning, connecting, disconnecting and scanning again when [GATT] Cache = yes is set in main.conf. Issue: https://github.com/bluez/bluez/issues/192 Suggested-by: Luiz Augusto von Dentz Signed-off-by: David Lechner --- src/device.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/device.c b/src/device.c index 53ef3e9a1..6d534c488 100644 --- a/src/device.c +++ b/src/device.c @@ -580,6 +580,7 @@ static void gatt_cache_cleanup(struct btd_device *device) bt_gatt_client_cancel_all(device->client); gatt_db_clear(device->db); + device->le_state.svc_resolved = false; } static void gatt_client_cleanup(struct btd_device *device) -- 2.25.1