#22 incorrect handling of time returned from netRecv... function

closed
nobody
None
5
2012-01-04
2011-06-13
Jan Breuer
No

1) general events should not be timestamped
correct prototype of coresponding function should be
ssize_t netRecvGeneral(Octet * buf, NetPath * netPath)

2) netRecvEvent can return zero time, after that UtcOffset is added without asking and all other subsequent tests "if time == 0 " fails.
it should be

length = netRecvEvent(ptpClock->msgIbuf, &time, &ptpClock->netPath);
if( time != 0 ) {
time.seconds += ptpClock->currentUtcOffset;
}

3) UtcOffset is also incorrectly handled when netRecvGeneral message is recieved because it is not added at all.
Solution for this should be point 1) remove time argument from netRecvGeneral because it is never used and it should be never used. (according to IEEE 1588 std)

Discussion

  • Fixed for 2.2.0
    Revision 145

     
    • status: open --> closed-fixed