Re: [chrony-dev] [PATCH] enable stratum setting for refclocks (take 2) |
[ Thread Index |
Date Index
| More chrony.tuxfamily.org/chrony-dev Archives
]
- To: chrony-dev@xxxxxxxxxxxxxxxxxxxx
- Subject: Re: [chrony-dev] [PATCH] enable stratum setting for refclocks (take 2)
- From: Miroslav Lichvar <mlichvar@xxxxxxxxxx>
- Date: Fri, 6 Oct 2017 09:53:41 +0200
- Authentication-results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=mlichvar@xxxxxxxxxx
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 3F02C7C839
On Thu, Oct 05, 2017 at 09:42:10PM +0200, Andreas Steinmetz wrote:
> > Does this really need a new SRC parameter? I'd prefer if this was an
> > option specific to refclocks and it just changed the stratum that is
> > passed with the refclock sample.
> >
>
> Now no new SRC parameter, but a new SRC function. The problem is that
> the required access to the structure to set the refclock stratum for
> SRC is only available to SRC.
Maybe I'm missing some detail, but why not just change the value
passed to SRC_AccumulateSample in refclock.c?
--- a/refclock.c
+++ b/refclock.c
@@ -635,7 +635,7 @@ poll_timeout(void *arg)
/* Handle special case when PPS is used with local stratum */
stratum = pps_stratum(inst, &sample_time);
else
- stratum = 0;
+ stratum = inst->stratum;
SRC_UpdateReachability(inst->source, 1);
SRC_AccumulateSample(inst->source, &sample_time, offset,
--
Miroslav Lichvar
--
To unsubscribe email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "unsubscribe" in the subject.
For help email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "help" in the subject.
Trouble? Email listmaster@xxxxxxxxxxxxxxxxxxxx.