Commit c7ca3220 authored by Joanne Hugé's avatar Joanne Hugé

Replace select by poll

parent b76d0ada
......@@ -127,7 +127,7 @@ void send_udp_packet(int use_etf, int use_timestamps, uint64_t txtime,
struct iovec iov;
int sendmsgerr;
int res;
fd_set readfs;
struct pollfd poll_fd = {fd, POLLPRI, 0};
memset(&sin, 0, sizeof(sin));
sin.sin_family = AF_INET;
......@@ -162,10 +162,7 @@ void send_udp_packet(int use_etf, int use_timestamps, uint64_t txtime,
if(use_timestamps) {
FD_ZERO(&readfs);
FD_SET(fd, &readfs);
res = select(fd + 1, &readfs, 0, NULL, NULL);
res = poll(&poll_fd, 1, 0);
if (res > 0)
process_timestamps();
else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment