X-Git-Url: https://git.sesse.net/?p=cubemap;a=blobdiff_plain;f=httpinput.cpp;h=49333c5f4357c48fa00184c6822931b95759d4b6;hp=bf8a8b1dd22e609d6611193ae1cf327c96c3d758;hb=c065a02f889b0f1166215278a9430ed1f560f0c2;hpb=37bc14f5b28f66ccc1760f410091f98769616476 diff --git a/httpinput.cpp b/httpinput.cpp index bf8a8b1..49333c5 100644 --- a/httpinput.cpp +++ b/httpinput.cpp @@ -136,8 +136,10 @@ int HTTPInput::lookup_and_connect(const string &host, const string &port) addrinfo *ai; int err = getaddrinfo(host.c_str(), port.c_str(), NULL, &ai); if (err != 0) { - log(WARNING, "[%s] Lookup of '%s' failed (%s).", - url.c_str(), host.c_str(), gai_strerror(err)); + if (!suppress_logging) { + log(WARNING, "[%s] Lookup of '%s' failed (%s).", + url.c_str(), host.c_str(), gai_strerror(err)); + } return -1; } @@ -205,8 +207,10 @@ int HTTPInput::lookup_and_connect(const string &host, const string &port) } // Give the last one as error. - log(WARNING, "[%s] Connect to '%s' failed (%s)", - url.c_str(), host.c_str(), strerror(errno)); + if (!suppress_logging) { + log(WARNING, "[%s] Connect to '%s' failed (%s)", + url.c_str(), host.c_str(), strerror(errno)); + } freeaddrinfo(base_ai); return -1; }