Commit c9a5cfc9 authored by Jean-Claude BAU's avatar Jean-Claude BAU

Fix issue P2P calculation correction field

On little indian architecture, the calculation of the correction field
was wrong in the PDelay_Resp_FollowUp message. This was introducing a
big random offset (few us) of the PPS.
parent 2dd6b463
......@@ -311,7 +311,7 @@ static int msg_pack_pdelay_resp_follow_up(struct pp_instance *ppi,
*(UInteger8 *) (buf + 4) = hdr->domainNumber; /* FIXME: why? */
/* We should copy the correction field and add our fractional part */
hdr->cField.scaled_nsecs
+= htonl(prec_orig_tstamp->scaled_nsecs & 0xffff);
+= prec_orig_tstamp->scaled_nsecs & 0xffff;
normalize_pp_time(&hdr->cField);
*(Integer32 *) (buf + 8) = htonl(hdr->cField.scaled_nsecs >> 32);
*(Integer32 *) (buf + 12) = htonl((int)hdr->cField.scaled_nsecs);
......
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