#30 error in handlePDelayResp

v1.0_(example)
closed
None
5
2015-06-08
2012-05-23
Anonymous
No

The variable ptpClock->recvPDelayRespSequenceId is not correctly updated because the line ptpClock->recvPDelayRespSequenceId = header->sequenceId; is never executed. This is because there is an if/else sentence (if ((header->flagField0 & PTP_TWO_STEP) == PTP_TWO_STEP)) before this line, where a break is always executed. The break sentence exits the program from the switch loop.
To fix this, both break sentences (in the if and the else section)should be removed and a break could be placed after ptpClock->recvPDelayRespSequenceId = header->sequenceId.

Discussion

  • Inaqui Delgado

    Inaqui Delgado - 2012-05-23

    It looks like ptpClock->recvPDelayRespSequenceId was introduced in rev 167 but as you stated above it does not get updated due to the break statements in the if else structure. I submitted the change to rev 190.

     
  • Jan Breuer

    Jan Breuer - 2013-09-17
    • status: open --> pending
    • Group: --> v1.0_(example)
     
  • Wojciech Owczarek

    • status: pending --> closed
    • assigned_to: Jan Breuer
     
  • Wojciech Owczarek

    Code seems to have this fix - closing.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks