Commit e89573a3 authored by Alessandro Rubini's avatar Alessandro Rubini

main loops: discard wrong application of UTC offset

We definitely need to take care of currentUtcOffset, but the current
implementation was wrong: it only used it in modifying receive stamps,
thus achieving completely wrong tuples.

It's the receive function that must apply the utcOffset, or not,
according to how it timestamps frames.  Similarly, it's the time
setting functions that must use utcOffset, or not, according to whether
the time is utc (e.g.: unix) or tai (e.g.: wr).

So this just removes a wrong attempt, waiting for good stuff to be written.
Anyways, the utcOffset reported by the master is kept in data structures
and passed over to slaves.
Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent b040458b
......@@ -113,9 +113,6 @@ void unix_main_loop(struct pp_globals *ppg)
PP_MAX_FRAME_LENGTH - 4,
&ppi->last_rcv_time);
ppi->last_rcv_time.seconds
+= DSPRO(ppi)->currentUtcOffset;
if (i < PP_MINIMUM_LENGTH) {
pp_diag(ppi, frames, 1,
"Error or short frame: "
......
......@@ -152,9 +152,6 @@ void wrs_main_loop(struct pp_globals *ppg)
PP_MAX_FRAME_LENGTH - 4,
&ppi->last_rcv_time);
ppi->last_rcv_time.seconds
+= DSPRO(ppi)->currentUtcOffset;
if (i < PP_MINIMUM_LENGTH) {
pp_diag(ppi, frames, 1,
"Error or short frame: "
......
......@@ -69,7 +69,6 @@ void bare_main_loop(struct pp_instance *ppi)
i = ppi->n_ops->recv(ppi, ppi->rx_frame,
PP_MAX_FRAME_LENGTH - 4,
&ppi->last_rcv_time);
ppi->last_rcv_time.seconds += DSPRO(ppi)->currentUtcOffset;
/* we passed payload but it filled the ether header too */
if (((struct bare_ethhdr *)(ppi->rx_frame))->h_proto
......
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