]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
http: improve the error logging
authorJaroslav Kysela <perex@perex.cz>
Fri, 15 Aug 2014 10:25:44 +0000 (12:25 +0200)
committerJaroslav Kysela <perex@perex.cz>
Fri, 15 Aug 2014 10:25:44 +0000 (12:25 +0200)
src/http.c

index 967ff9800507f7d85f09445dc8c6b17cf2c7c334..eba2351772e9969d3a39fcf7aaf5db0f7a15eb8a 100644 (file)
@@ -313,8 +313,9 @@ http_error(http_connection_t *hc, int error)
 
   tcp_get_ip_str((struct sockaddr*)hc->hc_peer, addrstr, 50);
 
-  tvhlog(LOG_ERR, "HTTP", "%s: %s -- %d", 
-        addrstr, hc->hc_url, error);
+  if (error != HTTP_STATUS_FOUND && error != HTTP_STATUS_MOVED)
+    tvhlog(error < 400 ? LOG_INFO : LOG_ERR, "HTTP", "%s: %s -- %d",
+          addrstr, hc->hc_url, error);
 
   htsbuf_queue_flush(&hc->hc_reply);