summaryrefslogtreecommitdiffstats
path: root/refclock.c
diff options
context:
space:
mode:
Diffstat (limited to 'refclock.c')
-rw-r--r--refclock.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/refclock.c b/refclock.c
index 84f7439..22d775a 100644
--- a/refclock.c
+++ b/refclock.c
@@ -166,8 +166,8 @@ RCL_AddRefclock(RefclockParameters *params)
if (!inst->driver->init && !inst->driver->poll)
LOG_FATAL("refclock driver %s is not compiled in", params->driver_name);
- if (params->tai && !CNF_GetLeapSecTimezone())
- LOG_FATAL("refclock tai option requires leapsectz");
+ if (params->tai && !CNF_GetLeapSecList() && !CNF_GetLeapSecTimezone())
+ LOG_FATAL("refclock tai option requires leapseclist or leapsectz");
inst->data = NULL;
inst->driver_parameter = Strdup(params->driver_parameter);
@@ -321,6 +321,22 @@ RCL_ReportSource(RPT_SourceReport *report, struct timespec *now)
}
}
+int
+RCL_ModifyOffset(uint32_t ref_id, double offset)
+{
+ unsigned int i;
+
+ for (i = 0; i < ARR_GetSize(refclocks); i++) {
+ RCL_Instance inst = get_refclock(i);
+ if (inst->ref_id == ref_id) {
+ inst->offset = offset;
+ LOG(LOGS_INFO, "Source %s new offset %f", UTI_RefidToString(ref_id), offset);
+ return 1;
+ }
+ }
+ return 0;
+}
+
void
RCL_SetDriverData(RCL_Instance instance, void *data)
{