]> git.sesse.net Git - cubemap/blobdiff - httpinput.cpp
Replace all perror() calls with our own log calls.
[cubemap] / httpinput.cpp
index 0c5c62087eb50ebf60fd7192fa069ead9752be69..962be2a47d2c91a5de834727d90915e182378078 100644 (file)
@@ -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;