Return-Path: Date: Wed, 8 May 2013 10:26:12 +0300 From: Johan Hedberg To: Alex Deymo Cc: Vinicius Gomes , linux-bluetooth , keybuk Subject: Re: Short names on Extended Inquiry Result Message-ID: <20130508072612.GD9401@x220> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: Sender: linux-bluetooth-owner@vger.kernel.org List-ID: Hi Alex, On Mon, May 06, 2013, Alex Deymo wrote: > I though about several options and finally choose tho consider the > short name as an unknown name and thus calling the confirm_name() with > known_name in FALSE, but also report the device with the short name, > while we ask for the long name. > > This has the advantage of sending the device found signal earlier, but > may have a problem in the following scenario: > 1. We have a first call to update_found_devices() with a short name > and report it to the user. > 2. We request the full name. > 3. The device doesn't reply to this request (for any reason) > 4. We get a second call to update_found_devices() with a short name... > but since we already know "a name" we don't request the long name. > > To avoid this I think the best should be to include the name_complete > field in the struct btd_device together with the name. What do you > think? I'm not completely sure about this. In theory you could have a (broken or malicious) device with page scan disabled but inquiry scan enabled and such a device would be causing us to block all other baseband activity while we wait for a page timeout to happen each time we request its name. Since we anyway re-request the name when connecting this might not be worth it. Johan