Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp44252pxa; Fri, 21 Aug 2020 00:12:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxp9r2TfEgyGGT4/voiFv4Z2Q/JwqavB4bISxUQLQre663C//CkVaCBsoBmCIeeKuxN6Ord X-Received: by 2002:a17:906:7752:: with SMTP id o18mr1554132ejn.150.1597993966157; Fri, 21 Aug 2020 00:12:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597993966; cv=none; d=google.com; s=arc-20160816; b=srTMLWuCtzNg8YMxDGBxfiAznWN6G+nJqW4Eum4JsBOjRKDwcuskvS66HQLJcUqUhS kFgzvG016nUtQpYHQp+5HFJW6QHhU0yjQ8YOZlKPtKB0whr9A4vKo0UnOdL7XXbugBN0 BUSjKsAq5ScauigLlPzMqjnGrfxgfm53a0/Ft46jFJC8s7SLpc132iB8hwj3WcYnmX6P Au6dNorCe3V4tPEiuCxEQo0P6sgOXUICnm4SdUUGJg4IwRRA5fS3yNdF1XCAGemk2zI5 Hx9jhN+1RjhLTm2j5N7/jsGKg/fTpHxGUyPgHULYSilwe4BXeqkOoEWrUMVbJjg8a2/u GrmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=A7002B1FAcwCDVUObHOePcfzoOQKLPQFGoLw3Ly97fo=; b=uuLH+6lbFz7SwtuDPG0+6VGndIvH9J+HBx3UiALtU088Sfv1D47rbNSY9fXj81tBYk DV45n8Lv/oCT/ZfQ6bO3k2R2uNYR3LeI8m690WUi0joBmoVpeVKdsQr0As9VXrFFPr9Y 1zO2RiU/OR4JyRnsBHrEqNarpQrZs2cTGwLuhoTURXTd2ugQVUMPWTkeA6OpXgeSedCN G+5tdjgeCsiJh2p31DXorhhPn8JTb+xpRCXdx3dknCY7K8J8QmY6RswK3Wc1jTkzLAu+ /iqGsgYTUGn/BJlt9DQ6sToIE8gOgthTlduwZo4tyz1oy3zoeHU9pdg0zL47DP0PKM2v 9w7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=fHKpNm6x; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v19si605484ejf.83.2020.08.21.00.12.20; Fri, 21 Aug 2020 00:12:46 -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=pass header.i=@chromium.org header.s=google header.b=fHKpNm6x; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727982AbgHUHLt (ORCPT + 99 others); Fri, 21 Aug 2020 03:11:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60904 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727907AbgHUHLm (ORCPT ); Fri, 21 Aug 2020 03:11:42 -0400 Received: from mail-ej1-x643.google.com (mail-ej1-x643.google.com [IPv6:2a00:1450:4864:20::643]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 18BECC061385 for ; Fri, 21 Aug 2020 00:11:42 -0700 (PDT) Received: by mail-ej1-x643.google.com with SMTP id u21so462182ejz.0 for ; Fri, 21 Aug 2020 00:11:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=A7002B1FAcwCDVUObHOePcfzoOQKLPQFGoLw3Ly97fo=; b=fHKpNm6xgaGrPl6weHyKvuMKGy9JwVcEZGlSWRpHR9A6n4MGV2s9AAlqvd9IZLhoV1 fDw6JFHxULSKM1JZat2vhGZFTHoZg42JhIJqcBSP7gHD+AjCTYsc5E2UHHuP69TmUqyX qikAfLEkChBNt83fsOpz4NduWrhsRI9n4F1i8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=A7002B1FAcwCDVUObHOePcfzoOQKLPQFGoLw3Ly97fo=; b=ZSFf/Cf7sPUgak8OuEZeyoNLEO/gQJQYHr4xWN7NoIvN5t2yXIYUcR0aNy2DtmkrX+ OdRd+6kgQzvvtPc/yfIarluDDTEkd34rOmIhX7mOcz7pfBWu2XWw63IHOGlPQ1PYOp2w RZOpzVmpfe2EzcYKkuUiBQDRhqMnxfANxN0KGJpsNuOhs5R8sfJ7iEF5EQsXEdWMIaj2 L880AD7Yyw4BvWxIBJB79EKmL9ohGPL3Q3g2UIqW20sj+Y6Pz1nu0mr9kw6E2RoNh+/s OdDcL7a/+lSNtY1D8xmZxNirFbUQaP8c3tuW/4uOpea9N8PcGItm/zMt8fN3EW1BY6Ho MXzg== X-Gm-Message-State: AOAM530ghwzOiqyMmKLq1S2SxSnD7YviTrQUxkLn/PedDV1VHhjXjBkf 1KQS4LgdZL7PYEf869pH/RkGinK19Uc9sw== X-Received: by 2002:a17:906:59b:: with SMTP id 27mr1697745ejn.56.1597993900488; Fri, 21 Aug 2020 00:11:40 -0700 (PDT) Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com. [209.85.128.52]) by smtp.gmail.com with ESMTPSA id d7sm750480ejk.99.2020.08.21.00.11.40 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 21 Aug 2020 00:11:40 -0700 (PDT) Received: by mail-wm1-f52.google.com with SMTP id k20so800946wmi.5 for ; Fri, 21 Aug 2020 00:11:40 -0700 (PDT) X-Received: by 2002:a05:600c:2050:: with SMTP id p16mr2444179wmg.154.1597993898999; Fri, 21 Aug 2020 00:11:38 -0700 (PDT) MIME-Version: 1.0 References: <20200821062526.16689-1-sonnysasaka@chromium.org> In-Reply-To: <20200821062526.16689-1-sonnysasaka@chromium.org> From: Sonny Sasaka Date: Fri, 21 Aug 2020 00:11:28 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH BlueZ] device: unset disconnecting flag when connection is removed To: BlueZ Cc: Joseph Hwang Content-Type: text/plain; charset="UTF-8" Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Dear Maintainers, Please ignore this patch as it is broken. Apologize for the mistake. On Thu, Aug 20, 2020 at 11:25 PM Sonny Sasaka wrote: > > From: Joseph Hwang > > A disconnecting flag has been used to avoid race condition > between the service browsing thread and the disconnecting > thread. We need to unset the flag when connection is removed. > > --- > src/device.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/src/device.c b/src/device.c > index 7b7808405..5ab591dd4 100644 > --- a/src/device.c > +++ b/src/device.c > @@ -3041,6 +3041,9 @@ void device_remove_connection(struct btd_device *device, uint8_t bdaddr_type) > "Paired"); > } > > + if (device) > + set_client_diconnecting(device->client, false); > + > if (device->bredr_state.connected || device->le_state.connected) > return; > > -- > 2.26.2 >