]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
cmdmon: don't report selection options in source report
authorMiroslav Lichvar <mlichvar@redhat.com>
Mon, 25 May 2020 11:58:00 +0000 (13:58 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Tue, 2 Jun 2020 06:53:56 +0000 (08:53 +0200)
The selection options returned as flags are not reported by the
client and will be better reported in a separate command with other
selection-specific data.

candm.h
cmdmon.c
reports.h
sources.c

diff --git a/candm.h b/candm.h
index a23eadfb59b0b1ebab94a9b86fb9f6d23328db22..e7a76d2a57de9062aa20e6a2600a96ab9bd7e631 100644 (file)
--- a/candm.h
+++ b/candm.h
@@ -550,11 +550,6 @@ typedef struct {
 #define RPY_SD_ST_CANDIDATE 4
 #define RPY_SD_ST_OUTLIER 5
 
-#define RPY_SD_FLAG_NOSELECT 0x1
-#define RPY_SD_FLAG_PREFER 0x2
-#define RPY_SD_FLAG_TRUST 0x4
-#define RPY_SD_FLAG_REQUIRE 0x8
-
 typedef struct {
   IPAddr ip_addr;
   int16_t poll;
index 20b1c2cf3df528a38712e3087404bb155ec33556..7ac79bc00227bef07ad56151c8f3146473e98513 100644 (file)
--- a/cmdmon.c
+++ b/cmdmon.c
@@ -601,11 +601,7 @@ handle_source_data(CMD_Request *rx_message, CMD_Reply *tx_message)
         tx_message->data.source_data.mode    = htons(RPY_SD_MD_REF);
         break;
     }
-    tx_message->data.source_data.flags =
-                  htons((report.sel_options & SRC_SELECT_PREFER ? RPY_SD_FLAG_PREFER : 0) |
-                        (report.sel_options & SRC_SELECT_NOSELECT ? RPY_SD_FLAG_NOSELECT : 0) |
-                        (report.sel_options & SRC_SELECT_TRUST ? RPY_SD_FLAG_TRUST : 0) |
-                        (report.sel_options & SRC_SELECT_REQUIRE ? RPY_SD_FLAG_REQUIRE : 0));
+    tx_message->data.source_data.flags = htons(0);
     tx_message->data.source_data.reachability = htons(report.reachability);
     tx_message->data.source_data.since_sample = htonl(report.latest_meas_ago);
     tx_message->data.source_data.orig_latest_meas = UTI_FloatHostToNetwork(report.orig_latest_meas);
index 6f4a6252d21fba7b7192af39332c4b58f6068756..a41573ba653bd505bd49ac19ff34066010325c2d 100644 (file)
--- a/reports.h
+++ b/reports.h
@@ -37,7 +37,6 @@ typedef struct {
   int poll;
   enum {RPT_NTP_CLIENT, RPT_NTP_PEER, RPT_LOCAL_REFERENCE} mode;
   enum {RPT_SYNC, RPT_UNREACH, RPT_FALSETICKER, RPT_JITTERY, RPT_CANDIDATE, RPT_OUTLIER} state;
-  int sel_options;
 
   int reachability;
   unsigned long latest_meas_ago; /* seconds */
index ad2b225c27d506781ba891a0d93418cf9967b606..931406906b704d5085ab1b4996f39d4eabb6fead 100644 (file)
--- a/sources.c
+++ b/sources.c
@@ -1476,7 +1476,6 @@ SRC_ReportSource(int index, RPT_SourceReport *report, struct timespec *now)
         break;
     }
 
-    report->sel_options = src->sel_options;
     report->reachability = src->reachability;
 
     /* Call stats module to fill out estimates */