X-Git-Url: https://git.sesse.net/?p=cubemap;a=blobdiff_plain;f=httpinput.cpp;h=962be2a47d2c91a5de834727d90915e182378078;hp=0c5c62087eb50ebf60fd7192fa069ead9752be69;hb=4856c49f1b63753ce86ad759ee649a1117628a8e;hpb=95ffb595e77280a7ce9e2412ce746565fb760020 diff --git a/httpinput.cpp b/httpinput.cpp index 0c5c620..962be2a 100644 --- a/httpinput.cpp +++ b/httpinput.cpp @@ -62,7 +62,7 @@ void HTTPInput::close_socket() } while (ret == -1 && errno == EINTR); if (ret == -1) { - perror("close()"); + log_perror("close()"); } } @@ -115,7 +115,7 @@ int HTTPInput::lookup_and_connect(const string &host, const string &port) } while (err == -1 && errno == EINTR); if (err == -1) { - perror("close"); + log_perror("close"); // Can still continue. } @@ -223,7 +223,7 @@ void HTTPInput::do_work() continue; } if (nfds == -1) { - perror("poll"); + log_perror("poll"); state = CLOSING_SOCKET; } } @@ -249,7 +249,7 @@ void HTTPInput::do_work() // Yay, successful connect. Try to set it as nonblocking. int one = 1; if (ioctl(sock, FIONBIO, &one) == -1) { - perror("ioctl(FIONBIO)"); + log_perror("ioctl(FIONBIO)"); state = CLOSING_SOCKET; } else { state = SENDING_REQUEST; @@ -267,7 +267,7 @@ void HTTPInput::do_work() } while (ret == -1 && errno == EINTR); if (ret == -1) { - perror("write"); + log_perror("write"); state = CLOSING_SOCKET; continue; } @@ -289,7 +289,7 @@ void HTTPInput::do_work() } while (ret == -1 && errno == EINTR); if (ret == -1) { - perror("read"); + log_perror("read"); state = CLOSING_SOCKET; continue; } @@ -343,7 +343,7 @@ void HTTPInput::do_work() } while (ret == -1 && errno == EINTR); if (ret == -1) { - perror("read"); + log_perror("read"); state = CLOSING_SOCKET; continue; } @@ -365,7 +365,7 @@ void HTTPInput::do_work() } while (err == -1 && errno == EINTR); if (err == -1) { - perror("close"); + log_perror("close"); } state = NOT_CONNECTED;