[vlc-devel] [PATCH] Add support for libproxy to the access module http. Libproxy reads proxy settings from kde, gnome, networkmanager, environment
Pierre d'Herbemont
pdherbemont at free.fr
Sun Jun 15 13:01:01 CEST 2008
On Jun 15, 2008, at 11:25 AM, Dominique Leuenberger wrote:
> +#ifdef HAVE_PROXY_H
> + else
> + {
> + pxProxyFactory *pf = px_proxy_factory_new();
>
We tend not to use tab, but 4 spaces for indentation... Could you fix
that too?
> + char *buf;
> + int i;
> + i=asprintf(&buf, "%s://%s", p_access->psz_access, p_access-
> >psz_path);
As Rémi noted, you need to check the return value of asprintf.
> + msg_Dbg(p_access, "asking libproxy about url '%s'", buf);
> + char **proxies = px_proxy_factory_get_proxies(pf, buf);
> + if (proxies[0])
> + {
> + msg_Dbg(p_access, "libproxy suggest to use '%s'", proxies[0]);
> + if(proxies[0] != "direct://")
As Rémi noted this won't give the expected result. Use strcmp.
Thanks for keeping improving your patch.
Pierre.
More information about the vlc-devel
mailing list