Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp4076367pxb; Mon, 4 Oct 2021 16:56:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzk+Ahp8pVfZIpXH6MHymAQjbI7RTT1Flua+DsTl02YkGwXFcS5IEaJ+hGjf/gM2zmUelFH X-Received: by 2002:a17:907:3e05:: with SMTP id hp5mr19849465ejc.527.1633391771841; Mon, 04 Oct 2021 16:56:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633391771; cv=none; d=google.com; s=arc-20160816; b=TnLgTC6DTLeYjQxs/HilXGlp6G5unCsOh2wrjTxYg3wKtaYB1MZmLMWgb/Hno08XX2 KrqYkG2ysH43hl/yoZDBhUgaebMD9+Wbd8/wGB5uN1VgoyWVQN4gnhrM6qtqBtuQr4Hr /VeWaDBvmw5mi7jFKoEgvUUGI37tYhDKs1Fo6BXvz/ePePmJdAMJEegL25a1JKrrO1jP Y0hDbUzewRx9PRIsFbudn/DOxQKEC4eH38ge0he5BVazsXBzlNCcR83zGPdIxWco823/ JD5N2F4vnZ9Mv9GT7Zk2Z87MvmXvik40+VfN4PFOecMINE8DmlkIpEgwTZiqczmjBi1s PQGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=K4bkWGF+I8ewZ97VzVY3bAyRXjrlH7knH95Ik/OioE4=; b=LNBHdthqCQG0jlFdDudI4pv64KHJCLCQ0xY5vIt9lHXoatJ6ipYPzlLMqSoBJSsu+I loIGyaKWlDrgyZGWvknSsCqe1ajnHH4jlEVDBEq9DPIzXQ406NJtesS6dtohDYgu9/wZ Wz1iUUfwFh31EkfzQS4PXw09jEMdJk9QRAOiiBvhfb7tuZsQWSG754E4qJmN2AQ+o7eK IJ9G+oDHuNXdokLgwy0plYmvu8mA5el8J78DbjAjDvuT3R34SvRNtYT2pwS9WZ4eGvsM /DGaTDDE3JSb3wakcSfsfhQgxE9ZPWaSnQr/sXVlBNTnw0aLeDBzA71AngUmDVhtGCQl X8ow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=P7lwDfL8; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id nc14si33987263ejc.181.2021.10.04.16.55.47; Mon, 04 Oct 2021 16:56:11 -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=@gmail.com header.s=20210112 header.b=P7lwDfL8; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236741AbhJDWtj (ORCPT + 99 others); Mon, 4 Oct 2021 18:49:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54114 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233501AbhJDWti (ORCPT ); Mon, 4 Oct 2021 18:49:38 -0400 Received: from mail-vk1-xa31.google.com (mail-vk1-xa31.google.com [IPv6:2607:f8b0:4864:20::a31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 54792C061745 for ; Mon, 4 Oct 2021 15:47:49 -0700 (PDT) Received: by mail-vk1-xa31.google.com with SMTP id b67so8417463vkb.13 for ; Mon, 04 Oct 2021 15:47:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=K4bkWGF+I8ewZ97VzVY3bAyRXjrlH7knH95Ik/OioE4=; b=P7lwDfL8v5tCmTJi6FYQ2Y/b+mYnbgAVE7CjxGx+m1UBsH+xxz8YtzIUIXEQ/7Cknl YS9lRmDn3UkUZvk5gJOfMuKnrWVLIXUDxJ/e36H1J0Kq6SQrCbIs8Hw4eLxhLKlJupO2 u2F7Dnql+5Wd46ftytTQZC7fuRgYFsMcYv8BJZaam8rNJqHZdr49eVFpzIm4iDQw1fh9 MdxOMkVo2pkYymjUOGIqRprb2VQLSoUzNT0FaDr4b+1W48lCMslb5BCh3aDWcWNur4Xi 5uqlzIQEQGxCa3z+ErovnnexXQka0YZNDzA9fdFrY5iHtUb3p1srkQinhiUnIGIGEuJR 4wAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=K4bkWGF+I8ewZ97VzVY3bAyRXjrlH7knH95Ik/OioE4=; b=1OFDQFc2fvYZjP83V6oh//WCt8EMgsukVtSI8ec/ZerBSMLDCrTrqn4+I7lI6Sd1he OE/4b+XmJc+LTbwXsQmKFYoS2atFFP7ZNU7sGVdQADWplMDAvxFio8QZeK9EOqgrlF3A zyXgrndbExpUFHXKZV0j6zAV0fNeuPcuy1CiGqmF6vWruMOoMngVMQ9+w5lx3fKdR08e Y/O2AWBMP5OP2oYLDWKHG3xIc1K4oXdkNGdV0FjTl1McHDKjWg2lVUsoqvqALEmPXW1T IoU9FfsVxxIisk/VOY9csK8GwlJr/8NvKYKjPzEDpsrZEFT2fBaLiLhxcLU2rPF44p8/ G59w== X-Gm-Message-State: AOAM531xbL7yzOz+7HquXuON30z9kx4yMUw1s+rIbmq0YCoK0iuMA0zJ 03BXTzwIKfoD4IPGJUaohsO+maTsot5cR6zm21w= X-Received: by 2002:a1f:a9c4:: with SMTP id s187mr19438936vke.9.1633387668260; Mon, 04 Oct 2021 15:47:48 -0700 (PDT) MIME-Version: 1.0 References: <20210921181243.BlueZ.v1.1.I261f9c1ee78b90f81a6c323c23065615be917c33@changeid> In-Reply-To: From: Luiz Augusto von Dentz Date: Mon, 4 Oct 2021 15:47:37 -0700 Message-ID: Subject: Re: [BlueZ PATCH v1] adv_monitor: Mark the device as lost on device_lost_timeout To: Manish Mandlik Cc: Marcel Holtmann , ChromeOS Bluetooth Upstreaming , "linux-bluetooth@vger.kernel.org" , Yun-Hao Chung Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Manish, On Mon, Sep 27, 2021 at 11:30 AM Manish Mandlik wrote: > > Friendly reminder to review this patch. :) > > Regards, > Manish. > > > On Tue, Sep 21, 2021 at 6:13 PM Manish Mandlik wrote: >> >> Mark the device as lost on device_lost_timeout so that it can be found >> again next time. >> >> Verified this by adding a monitor using bluetoothctl and confirming that >> the DeviceLost event is getting triggered when bt peer stops advertising >> and DeviceFound event gets triggered again when the bt peer restarts the >> advertising. >> >> Reviewed-by: Yun-Hao Chung >> --- >> >> src/adv_monitor.c | 2 ++ >> 1 file changed, 2 insertions(+) >> >> diff --git a/src/adv_monitor.c b/src/adv_monitor.c >> index 715ac5904..a55e1ea2d 100644 >> --- a/src/adv_monitor.c >> +++ b/src/adv_monitor.c >> @@ -1892,7 +1892,9 @@ static bool handle_device_lost_timeout(gpointer user_data) >> g_dbus_proxy_method_call(monitor->proxy, "DeviceLost", >> report_device_state_setup, >> NULL, dev->device, NULL); >> + >> dev->lost_timer = 0; >> + dev->found = false; >> >> return FALSE; >> } >> -- >> 2.33.0.464.g1972c5931b-goog >> Applied, thanks. -- Luiz Augusto von Dentz