Menu

#329 dataSize is taken from wrong header type for received TSN messages

2.0.3.0
closed
None
2020-08-21
2020-04-30
No

In trdp_pdReceive() pExistingElement->dataSize is assigned from the messsges header. But it don't consider if it is a TSN messges with a different messges header structure. So for TSN messages total wrong size is assigned and causing problems later.

A sugestion for this function is to use a temporery header filled once with data from the received header, parsing the differnet types. This avoids mistakes when editing this funciton later on.

Discussion

  • Anders Öberg

    Anders Öberg - 2020-04-30

    Possible fix

            if (isTSN)
            {
                pExistingElement->dataSize = vos_ntohs(pTSNFrameHead->datasetLength);
            }
            else
            {
                pExistingElement->dataSize = vos_ntohl(pNewFrameHead->datasetLength);
            }
    
     
  • Bernd Löhr

    Bernd Löhr - 2020-05-04
    • status: open --> accepted
    • assigned_to: Bernd Löhr
     
  • Bernd Löhr

    Bernd Löhr - 2020-05-04
    • status: accepted --> pending
     
  • Bernd Löhr

    Bernd Löhr - 2020-05-04

    Need to honour compile-time flags, too.

     
  • Bernd Löhr

    Bernd Löhr - 2020-07-08
    • Milestone: 2.1.0.0 --> 2.0.3.0
     
  • Bernd Löhr

    Bernd Löhr - 2020-08-21
    • Status: pending --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB