[pulseaudio-discuss] [PATCH v4 5/7] bluetooth: Modular API for A2DP codecs

Pali Rohár pali.rohar at gmail.com
Sun Jan 27 09:56:54 UTC 2019


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 at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20190127/83f79e90/attachment.sig>


More information about the pulseaudio-discuss mailing list