]> git.sesse.net Git - cubemap/blobdiff - udpinput.cpp
Merge branch 'master' of /srv/git.sesse.net/www/cubemap
[cubemap] / udpinput.cpp
index bed7b446a8285d76b921b01ede86097918c2f0e5..081f631c47e114ba42f7ff46699667d8d1d31c5e 100644 (file)
@@ -1,16 +1,18 @@
+#include <assert.h>
+#include <errno.h>
+#include <poll.h>
 #include <stdio.h>
-#include <sys/types.h>
+#include <stdlib.h>
 #include <sys/socket.h>
-#include <sys/poll.h>
-#include <arpa/inet.h>
-#include <errno.h>
+#include <unistd.h>
 #include <string>
 
 #include "acceptor.h"
-#include "udpinput.h"
+#include "log.h"
 #include "serverpool.h"
-#include "version.h"
 #include "state.pb.h"
+#include "udpinput.h"
+#include "version.h"
 
 using namespace std;
 
@@ -83,7 +85,7 @@ void UDPInput::do_work()
                        int port_num = atoi(port.c_str());
                        sock = create_server_socket(port_num, UDP_SOCKET);
                        if (sock == -1) {
-                               fprintf(stderr, "WARNING: UDP socket creation failed. Waiting 0.2 seconds and trying again...\n");
+                               log(WARNING, "UDP socket creation failed. Waiting 0.2 seconds and trying again...");
                                usleep(200000);
                                continue;
                        }