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.ro...@gmail.com

Attachment: signature.asc
Description: PGP signature

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

Reply via email to