[pulseaudio-discuss] [PATCH 1/2] bluetooth: Check adapter address to set device_info_valid

Tanu Kaskinen tanu.kaskinen at linux.intel.com
Fri Nov 22 08:40:42 PST 2013


On Wed, 2013-11-20 at 18:21 -0300, jprvita at gmail.com wrote:
> From: João Paulo Rechi Vita <jprvita at gmail.com>
> 
> If the adapter object has no address information the device information
> should be marked as invalid.
> ---
>  src/modules/bluetooth/bluez5-util.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/modules/bluetooth/bluez5-util.c b/src/modules/bluetooth/bluez5-util.c
> index c8ff219..d2893c0 100644
> --- a/src/modules/bluetooth/bluez5-util.c
> +++ b/src/modules/bluetooth/bluez5-util.c
> @@ -820,8 +820,8 @@ static void parse_interfaces_and_properties(pa_bluetooth_discovery *y, DBusMessa
>  
>          if (!d->adapter && d->adapter_path) {
>              d->adapter = pa_hashmap_get(d->discovery->adapters, d->adapter_path);
> -            if (!d->adapter) {
> -                pa_log_error("Device %s is child of nonexistent adapter %s", d->path, d->adapter_path);
> +            if (!d->adapter || !d->adapter->address) {
> +                pa_log_error("Device %s is child of nonexistent or corrupted adapter %s", d->path, d->adapter_path);
>                  set_device_info_valid(d, -1);
>              } else
>                  set_device_info_valid(d, 1);

Thanks, applied both patches.

-- 
Tanu



More information about the pulseaudio-discuss mailing list