}
int
-RCL_AddSample(RCL_Instance instance, struct timeval *sample_time, double offset, NTP_Leap leap_status)
+RCL_AddSample(RCL_Instance instance, struct timeval *sample_time, double offset, int leap)
{
double correction, dispersion;
struct timeval cooked_time;
return 0;
filter_add_sample(&instance->filter, &cooked_time, offset - correction + instance->offset, dispersion);
- instance->leap_status = leap_status;
+
+ switch (leap) {
+ case LEAP_Normal:
+ case LEAP_InsertSecond:
+ case LEAP_DeleteSecond:
+ instance->leap_status = leap;
+ break;
+ default:
+ instance->leap_status = LEAP_Unsynchronised;
+ break;
+ }
log_sample(instance, &cooked_time, 0, 0, offset, offset - correction + instance->offset, dispersion);
extern void *RCL_GetDriverData(RCL_Instance instance);
extern char *RCL_GetDriverParameter(RCL_Instance instance);
extern char *RCL_GetDriverOption(RCL_Instance instance, char *name);
-extern int RCL_AddSample(RCL_Instance instance, struct timeval *sample_time, double offset, NTP_Leap leap_status);
+extern int RCL_AddSample(RCL_Instance instance, struct timeval *sample_time, double offset, int leap);
extern int RCL_AddPulse(RCL_Instance instance, struct timeval *pulse_time, double second);
#endif