mirror of
https://github.com/mirror/wget.git
synced 2025-03-14 03:40:15 +08:00
Fix libproxy build with --disable-debug
The definition of debug_logprintf in src/log.c is guarded by ENABLE_DEBUG (although its prototype is unconditionally available in src/log.h). The uses of debug_logprintf in src/retr.c aren't guarded by ENABLE_DEBUG. Use the DEBUGP macro which is designed for this purpose. * src/retr.c (getproxy): Use DEBUGP macro. Fixes: https://gitlab.com/gnuwget/wget/-/issues/19 Copyright-paperwork-exempt: Yes
This commit is contained in:
parent
1c934e67de
commit
5f0aa59239
@ -1498,21 +1498,21 @@ getproxy (struct url *u)
|
||||
pxProxyFactory *pf = px_proxy_factory_new ();
|
||||
if (!pf)
|
||||
{
|
||||
debug_logprintf ("Allocating memory for libproxy failed");
|
||||
DEBUGP (("Allocating memory for libproxy failed"));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
debug_logprintf ("asking libproxy about url '%s'\n", u->url);
|
||||
DEBUGP (("asking libproxy about url '%s'\n", u->url));
|
||||
char **proxies = px_proxy_factory_get_proxies (pf, u->url);
|
||||
if (proxies)
|
||||
{
|
||||
if (proxies[0])
|
||||
{
|
||||
debug_logprintf ("libproxy suggest to use '%s'\n", proxies[0]);
|
||||
DEBUGP (("libproxy suggest to use '%s'\n", proxies[0]));
|
||||
if (strcmp (proxies[0], "direct://") != 0)
|
||||
{
|
||||
proxy = xstrdup (proxies[0]);
|
||||
debug_logprintf ("libproxy setting to use '%s'\n", proxy);
|
||||
DEBUGP (("libproxy setting to use '%s'\n", proxy));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user