mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 16:35:06 -05:00
ntp: add support for multiple suspended sockets
With some hardware it takes milliseconds to get the HW TX timestamp. Rework the code to handle multiple suspended client-only sockets at the same time in order to allow longer timeouts, which may overlap for different sources. Instead of waiting for the first read event simply suspend the socket and create timeout when the HW TX timestamp is requested.
This commit is contained in:
5
ntp_io.c
5
ntp_io.c
@@ -467,11 +467,6 @@ read_from_socket(int sock_fd, int event, void *anything)
|
||||
SCK_Message *messages;
|
||||
int i, received, flags = 0;
|
||||
|
||||
#ifdef HAVE_LINUX_TIMESTAMPING
|
||||
if (NIO_Linux_ProcessEvent(sock_fd, event))
|
||||
return;
|
||||
#endif
|
||||
|
||||
if (event == SCH_FILE_EXCEPTION) {
|
||||
#ifdef HAVE_LINUX_TIMESTAMPING
|
||||
flags |= SCK_FLAG_MSG_ERRQUEUE;
|
||||
|
||||
Reference in New Issue
Block a user