Commit de0f017b authored by Alessandro Rubini's avatar Alessandro Rubini

proto-starndard: invalidate T1 when entering slave mode

Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent d8718e55
......@@ -111,6 +111,12 @@ void pp_servo_got_resp(struct pp_instance *ppi)
Integer32 adj;
int s;
/* We sometimes enter here before we got sync/f-up */
if (ppi->t1.seconds == 0 && ppi->t1.nanoseconds == 0) {
pp_diag(ppi, servo, 2, "discard T3/T4: we miss T1/T2\n");
return;
}
/*
* calc 'slave_to_master_delay', removing the correction field
* added by transparent clocks in the path.
......
......@@ -17,6 +17,7 @@ int pp_slave(struct pp_instance *ppi, unsigned char *pkt, int plen)
int d1, d2;
if (ppi->is_new_state) {
memset(&ppi->t1, 0, sizeof(ppi->t1));
pp_servo_init(ppi);
if (pp_hooks.new_slave)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment