mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-04 23:25:06 -05:00
ntp: skip loop test if no server socket is open
If there is no socket that could receive a request from a client or peer, we know that nothing can be synchronized to us and no loop is possible.
This commit is contained in:
@@ -39,6 +39,7 @@ static int req_length, res_length;
|
||||
#define NIO_OpenClientSocket(addr) ((addr)->ip_addr.family != IPADDR_UNSPEC ? 101 : 0)
|
||||
#define NIO_CloseClientSocket(fd) assert(fd == 101)
|
||||
#define NIO_IsServerSocket(fd) (fd == 100)
|
||||
#define NIO_IsServerSocketOpen() 1
|
||||
#define NIO_SendPacket(msg, to, from, len, process_tx) (memcpy(&req_buffer, msg, len), req_length = len, 1)
|
||||
#define SCH_AddTimeoutByDelay(delay, handler, arg) (1 ? 102 : (handler(arg), 1))
|
||||
#define SCH_AddTimeoutInClass(delay, separation, randomness, class, handler, arg) \
|
||||
|
||||
Reference in New Issue
Block a user