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, ...@@ -127,7 +127,7 @@ void send_udp_packet(int use_etf, int use_timestamps, uint64_t txtime,
struct iovec iov; struct iovec iov;
int sendmsgerr; int sendmsgerr;
int res; int res;
fd_set readfs; struct pollfd poll_fd = {fd, POLLPRI, 0};
memset(&sin, 0, sizeof(sin)); memset(&sin, 0, sizeof(sin));
sin.sin_family = AF_INET; sin.sin_family = AF_INET;
...@@ -162,10 +162,7 @@ void send_udp_packet(int use_etf, int use_timestamps, uint64_t txtime, ...@@ -162,10 +162,7 @@ void send_udp_packet(int use_etf, int use_timestamps, uint64_t txtime,
if(use_timestamps) { if(use_timestamps) {
FD_ZERO(&readfs); res = poll(&poll_fd, 1, 0);
FD_SET(fd, &readfs);
res = select(fd + 1, &readfs, 0, NULL, NULL);
if (res > 0) if (res > 0)
process_timestamps(); process_timestamps();
else 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