X-Git-Url: https://git.sesse.net/?p=cubemap;a=blobdiff_plain;f=udpinput.cpp;h=ed53edeea073604d93de240ffea6b5c7d04d323d;hp=081f631c47e114ba42f7ff46699667d8d1d31c5e;hb=0d72f384a1de672824298262ba5c427ec0aee2d6;hpb=d1ad2cf60ca694f742e2061a596bc27c7e58f5c8 diff --git a/udpinput.cpp b/udpinput.cpp index 081f631..ed53ede 100644 --- a/udpinput.cpp +++ b/udpinput.cpp @@ -61,7 +61,7 @@ void UDPInput::close_socket() } while (ret == -1 && errno == EINTR); if (ret == -1) { - perror("close()"); + log_perror("close()"); } sock = -1; @@ -85,7 +85,8 @@ void UDPInput::do_work() int port_num = atoi(port.c_str()); sock = create_server_socket(port_num, UDP_SOCKET); if (sock == -1) { - log(WARNING, "UDP socket creation failed. Waiting 0.2 seconds and trying again..."); + log(WARNING, "[%s] UDP socket creation failed. Waiting 0.2 seconds and trying again...", + stream_id.c_str()); usleep(200000); continue; } @@ -102,7 +103,7 @@ void UDPInput::do_work() continue; } if (nfds == -1) { - perror("poll"); + log_perror("poll"); close_socket(); continue; } @@ -114,7 +115,7 @@ void UDPInput::do_work() } while (ret == -1 && errno == EINTR); if (ret <= 0) { - perror("recv"); + log_perror("recv"); close_socket(); continue; }