Re: [PATCH BlueZ v2 02/12] storage: Store address type in "aliases" file

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

 



Hi Johan,

From: Johan Hedberg <johan.hedberg@xxxxxxxxx>
Date: Thu, 5 Jul 2012 13:41:42 +0300

> This looks dangerous to me. Even though the only users of delete_entry()
> use addresses as the key values there's nothing about the naming of this
> function that suggests that it's only usable for key values with a very
> specific format compared to what the rest of storage.c is designed to
> support (arbitrary key values).

Agreed.

> Either the function name and/or the "key" parameter name needs to be
> changed to make this restricted use clear or then the error handling of
> old keys should be pushed to the caller side (device.c).

Ok. I think we can do something like this too:

int delete_entry(bdaddr_t *src, const char *storage, bdaddr_t *dst,
    			  	      	   	     uint8_t dst_type)
{
	...
	...
}

So, we're going to remove an entry from a given destinate address rather than
from a very specific key format, then we can treat old and new key formats
within it.

What do you think about this ?


		Paulo
--
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