From: Steinar H. Gunderson Date: Wed, 13 Jul 2016 18:58:38 +0000 (+0200) Subject: Add some log suppressions I missed last time. X-Git-Tag: 1.3.0~2 X-Git-Url: https://git.sesse.net/?p=cubemap;a=commitdiff_plain;h=c065a02f889b0f1166215278a9430ed1f560f0c2 Add some log suppressions I missed last time. --- 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; }