On Mon, 2014-08-11 at 12:47 +0300, Tanu Kaskinen wrote:
> If the transport for the profile doesn't exist, the old behaviour was
> to leave cp->available at the default value, which is
> PA_AVAILABLE_UNKNOWN, but if there's no transport, the profile should
> be marked as unavailable.
> ---
>  src/modules/bluetooth/module-bluez5-device.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/src/modules/bluetooth/module-bluez5-device.c 
> b/src/modules/bluetooth/module-bluez5-device.c
> index 57b2791..03f84d5 100644
> --- a/src/modules/bluetooth/module-bluez5-device.c
> +++ b/src/modules/bluetooth/module-bluez5-device.c
> @@ -1542,8 +1542,12 @@ static pa_card_profile *create_card_profile(struct 
> userdata *u, const char *uuid
>          *p = PA_BLUETOOTH_PROFILE_A2DP_SOURCE;
>      }
>  
> -    if (cp && u->device->transports[*p])
> -        cp->available = 
> transport_state_to_availability(u->device->transports[*p]->state);
> +    if (cp) {
> +        if (u->device->transports[*p])
> +            cp->available = 
> transport_state_to_availability(u->device->transports[*p]->state);
> +        else
> +            cp->available = PA_AVAILABLE_NO;
> +    }
>  
>      return cp;
>  }

No feedback received, I pushed this now.

-- 
Tanu

_______________________________________________
pulseaudio-discuss mailing list
pulseaudio-discuss@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss

Reply via email to