linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Youwan Wang <wangyouwan@uniontech.com>
To: linux-bluetooth@vger.kernel.org
Cc: Youwan Wang <wangyouwan@uniontech.com>
Subject: [PATCH] device: Fix timeout=1 to remove the device immediately
Date: Tue, 21 Jun 2022 21:48:18 +0800	[thread overview]
Message-ID: <20220621134818.11515-1-wangyouwan@uniontech.com> (raw)

 When I use bluetoothctl to remove a device,
 I find that the device has not been deleted.

 static void set_temporary_timer(device, 0)
 {
     ......
	if (!timeout)
		return;
   ......
  }
  
  Now I want to delete the connected device
    when call remove.
  I don't know whether this modification is
    feasible, please give me some suggestions.
---
 src/device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/device.c b/src/device.c
index 7b451e458..d38ad74fc 100644
--- a/src/device.c
+++ b/src/device.c
@@ -3159,7 +3159,7 @@ void device_remove_connection(struct btd_device *device, uint8_t bdaddr_type)
 						DEVICE_INTERFACE, "Connected");
 
 	if (remove_device)
-		set_temporary_timer(device, 0);
+		set_temporary_timer(device, 1);
 }
 
 guint device_add_disconnect_watch(struct btd_device *device,
-- 
2.20.1




             reply	other threads:[~2022-06-21 13:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-21 13:48 Youwan Wang [this message]
2022-06-21 15:21 ` device: Fix timeout=1 to remove the device immediately bluez.test.bot
2022-06-21 18:39 ` [PATCH] " Luiz Augusto von Dentz
     [not found]   ` <tencent_6B5C18C2035497666D06DB0C@qq.com>
2022-06-22 20:07     ` Luiz Augusto von Dentz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220621134818.11515-1-wangyouwan@uniontech.com \
    --to=wangyouwan@uniontech.com \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).