Re: [PATCH] android/bluetooth: Fix discovering new devices

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Johan,

On Tuesday 14 of January 2014 13:39:20 Johan Hedberg wrote:
> Hi Szymon,
> 
> On Tue, Jan 14, 2014, Szymon Janc wrote:
> > +	} else {
> > +		GSList *l;
> > +
> > +		for(l = devices; l; l = g_slist_next(l)) {
> 
> Coding style thing here (space after 'for'). You might wanna consider a
> helper function and g_slist_foreach here tough.
> 
> > +static bool device_found_needed(struct device *dev)
> > +{
> > +	if (!dev)
> > +		return true;
> > +
> > +	if (dev->bond_state == HAL_BOND_STATE_BONDED)
> > +		return false;
> > +
> > +	return !dev->found;
> > +}
> 
> I think you should provide lots more code comments here with proper
> explanations of each if-statement. E.g. your commit message doesn't
> mention anything about bonded devices and yet you have a check for this
> state here.

Now I think this check is not really needed, if paired remote is responding to
inquiry then just notify HAL as with any other device found.

I'll send V2 shortly.


-- 
Best regards, 
Szymon Janc
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux