Re: [PATCH v4 5/7] bluetooth: Modular API for A2DP codecs

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

 



On Thursday 24 January 2019 17:00:41 Pali Rohár wrote:
> On Thursday 24 January 2019 16:03:17 Luiz Augusto von Dentz wrote:
> > > @@ -553,14 +626,53 @@ pa_bluetooth_device* pa_bluetooth_discovery_get_device_by_address(pa_bluetooth_d
> > >      return NULL;
> > >  }
> > >
> > > +static char *remote_endpoint_path_to_device_path(const char *remote_endpoint_path) {
> > > +    char *endptr;
> > > +
> > > +    endptr = strrchr(remote_endpoint_path, '/');
> > 
> > There exists a property called Device exactly to avoid this kind of assumption.
> 
> Ok, I will look at it.

I fixed it locally to use "Device" property. Really there is not need to
do that path mangling. I will include this fix in next patch version.

> > > +    if (!endptr) {
> > > +        pa_log_error("Invalid remote endpoint %s", remote_endpoint_path);
> > > +        return NULL;
> > > +    }
> > > +
> > > +    return pa_xstrndup(remote_endpoint_path, endptr-remote_endpoint_path);
> > > +}

-- 
Pali Rohár
pali.rohar@xxxxxxxxx

Attachment: signature.asc
Description: PGP signature

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

[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux