mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 16:35:06 -05:00
ntp: refactor switching between online and offline state
Use an enum to describe connectivity of a source and merge the NCR and NSR TakeSourceOnline/Offline() functions into SetConnectivity() functions.
This commit is contained in:
@@ -29,10 +29,15 @@
|
||||
|
||||
#include "sources.h"
|
||||
|
||||
typedef enum {
|
||||
SRC_OFFLINE,
|
||||
SRC_ONLINE,
|
||||
} SRC_Connectivity;
|
||||
|
||||
typedef struct {
|
||||
int minpoll;
|
||||
int maxpoll;
|
||||
int online;
|
||||
SRC_Connectivity connectivity;
|
||||
int auto_offline;
|
||||
int presend_minpoll;
|
||||
int burst;
|
||||
|
||||
Reference in New Issue
Block a user