Received: by 2002:a05:6a10:87d6:0:0:0:0 with SMTP id g22csp174833pxr; Sun, 10 Apr 2022 10:53:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwZQ5Wy6W3NNWorzO84pHkTGDZNcgv+PLr6y/f11NiHUtuv4mtuYnKdqF0HaIE1XkZmHFXL X-Received: by 2002:a17:907:2d13:b0:6df:a061:8141 with SMTP id gs19-20020a1709072d1300b006dfa0618141mr27003892ejc.663.1649613194581; Sun, 10 Apr 2022 10:53:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649613194; cv=none; d=google.com; s=arc-20160816; b=y1FRBnODsGjMjsV8UJBmO5eymw8i1lV2VKOcHokyttIzlqUppq6wM0tshGcqv5x164 1S//o/HJTyHXH+k/SxTPOuX8esll1BIrKIWkLpN+B+Q4DiIuq+sHlXzC/nsCrx2iJ6oT 1CLQ/GX7MeGaYGFwdYANFHZKb/RP/pzxlufXnLJt/O4KLNCbyAaqm73HkZ+f+kLTrXom YhAWcI1EK1lj0eaL/5zvtnYqbi/k+mFq/H5En2CeQcnX8u3zv2Eu4vEJGFXa/ULKQrj6 D0Y/AJNYWF/lsQqPtN3Bm7ar+jvKHJ0Aydr/rWoKU6hNNYhp+bzSW5mmCm2RcX1vkcvS WAgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from:cc :references:to:content-language:subject:user-agent:mime-version:date :message-id; bh=m1Pwx5qYTSEQY1h3jTS/eJLemHre2OSyCvbeQnpmPRw=; b=cvU3sj46115twfBr/FbJSz+cG7npK5k8hQZpZU12xRJuGGPo+90Dm6hLYAteumBFsT o3OcUeZszwfXnDATxsPMOMI6DxPjZMHCKmOLvpHvSghWPbQ/ZR3XMZ5i7Qo5BFw/Txo/ Nyluuc86td/+c9ZJ5YhujobnlmemC6nix7xIvnXIAri6sBYKYgC51kWG4fqlHOTpfafp S7kuGSmNUuHuKyvkkwUurlH5RFxXkNUUaDuX7l7zfBGd6HOOkF6FKEymnxYkEkqIEnHZ nyLByCkjXVFbWqszDP37wJF6e9G5az0Fg9HpiWdd43P84yM8myjwS/XU7r+RyrB14pfB IYbg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g4-20020a17090669c400b006e4870fb699si5320037ejs.510.2022.04.10.10.52.34; Sun, 10 Apr 2022 10:53:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241620AbiDILiv (ORCPT + 99 others); Sat, 9 Apr 2022 07:38:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37032 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241656AbiDILir (ORCPT ); Sat, 9 Apr 2022 07:38:47 -0400 Received: from mx1.molgen.mpg.de (mx3.molgen.mpg.de [141.14.17.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2CD83B1A8C for ; Sat, 9 Apr 2022 04:36:36 -0700 (PDT) Received: from [192.168.0.2] (ip5f5ae90c.dynamic.kabel-deutschland.de [95.90.233.12]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: pmenzel) by mx.molgen.mpg.de (Postfix) with ESMTPSA id 4711461E6478B; Sat, 9 Apr 2022 13:36:34 +0200 (CEST) Message-ID: <805b3f2f-3537-b8e0-2709-325041d7c98c@molgen.mpg.de> Date: Sat, 9 Apr 2022 13:36:34 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Subject: Re: [PATCH BlueZ 1/1] adapter: Fix check of DISCOVERABLE setting Content-Language: en-US To: Jakob Hilmer References: <20220409100130.9743-1-jakob@hilmer.dk> <20220409100130.9743-2-jakob@hilmer.dk> Cc: linux-bluetooth@vger.kernel.org From: Paul Menzel In-Reply-To: <20220409100130.9743-2-jakob@hilmer.dk> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Dear Jakob, Am 09.04.22 um 12:01 schrieb Jakob Hilmer: > From: Jakob hilmer *H*ilmer? > The test for `DISCOVERABLE` should be done with > `MGMT_SETTING_DISCOVERABLE` instead of `MGMT_OP_SET_DISCOVERABLE`. > --- > src/adapter.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/src/adapter.c b/src/adapter.c > index 71de9e82b..f1197684e 100644 > --- a/src/adapter.c > +++ b/src/adapter.c > @@ -1993,7 +1993,7 @@ static bool set_discovery_discoverable(struct btd_adapter *adapter, bool enable) > return true; > > /* Reset discoverable filter if already set */ > - if (enable && (adapter->current_settings & MGMT_OP_SET_DISCOVERABLE)) > + if (enable && (adapter->current_settings & MGMT_SETTING_DISCOVERABLE)) > return true; > > adapter->discovery_discoverable = enable; > @@ -2229,7 +2229,7 @@ static int update_discovery_filter(struct btd_adapter *adapter) > /* Only attempt to overwrite current discoverable setting when not > * discoverable. > */ > - if (!(adapter->current_settings & MGMT_OP_SET_DISCOVERABLE)) { > + if (!(adapter->current_settings & MGMT_SETTING_DISCOVERABLE)) { > GSList *l; > > for (l = adapter->discovery_list; l; l = g_slist_next(l)) { Acked-by: Paul Menzel Kind regards, Paul