Skip to content

Fragmentation : Error in init of variables can cause wrong status report #1629

Open
@Kasimashi

Description

Description

In FragDecoderInit : Init of FragDecoder.Status.FragNbRx and FragDecoder.Status.MatrixError are missing.

#if( FRAG_DECODER_FILE_HANDLING_NEW_API == 1 )
void FragDecoderInit( uint16_t fragNb, uint8_t fragSize, FragDecoderCallbacks_t *callbacks )
#else
void FragDecoderInit( uint16_t fragNb, uint8_t fragSize, uint8_t *file, uint32_t fileSize )
#endif
{
#if( FRAG_DECODER_FILE_HANDLING_NEW_API == 1 )
    FragDecoder.Callbacks = callbacks;
#else
    FragDecoder.File = file;
    FragDecoder.FileSize = fileSize;
#endif
    FragDecoder.FragNb = fragNb;                                // FragNb = FRAG_MAX_SIZE
    FragDecoder.FragSize = fragSize;                            // number of byte on a row
    FragDecoder.Status.FragNbLastRx = 0;
    FragDecoder.Status.FragNbLost = 0;
    FragDecoder.Status.FragNbRx = 0;
    FragDecoder.Status.MatrixError = 0;
    FragDecoder.M2BLine = 0;

Actual Behavior

sequenceDiagram
    Gateway->>+Node: McGroupSetupReq
    Node->>-Gateway: McGroupSetupAns
    Gateway->>+Node: McClassCSessionReq
    Node->>-Gateway: McClassCSessionAns
    Gateway->>+Node: FragSessionSetupReq
    Node->>-Gateway: FragSessionSetupAns
    Gateway-->>+Node: FAILED TO SEND DATAFRAG
    Gateway-->>+Node: FAILED TO SEND DATAFRAG
    Gateway-->>+Node: FAILED TO SEND DATAFRAG
    Node->>Gateway: FragSessionSetupAns (FragNbRx!=0 or egal to last frag session)
    Gateway->>Gateway : Block can be considered as ok because of status
Loading

Expected Behavior

sequenceDiagram
  Gateway->>+Node: McGroupSetupReq
  Node->>-Gateway: McGroupSetupAns
  Gateway->>+Node: McClassCSessionReq
  Node->>-Gateway: McClassCSessionAns
  Gateway->>+Node: FragSessionSetupReq
  Node->>-Gateway: FragSessionSetupAns
  Gateway-->>+Node: FAILED TO SEND DATAFRAG
  Gateway-->>+Node: FAILED TO SEND DATAFRAG
  Gateway-->>+Node: FAILED TO SEND DATAFRAG
  Node->>Gateway: FragSessionSetupAns (FragNbRx=0)
  Gateway->>Gateway : Block can be considered as nok because of status
Loading

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions