Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Kasimashi opened this issue Jan 23, 2025 · 0 comments
Open

Comments

@Kasimashi
Copy link

Kasimashi commented Jan 23, 2025

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant