]> git.sesse.net Git - cubemap/commitdiff
Add some log suppressions I missed last time.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Wed, 13 Jul 2016 18:58:38 +0000 (20:58 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Wed, 13 Jul 2016 18:58:38 +0000 (20:58 +0200)
httpinput.cpp

index bf8a8b1dd22e609d6611193ae1cf327c96c3d758..49333c5f4357c48fa00184c6822931b95759d4b6 100644 (file)
@@ -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;
 }