Skip to content

subtracting header_length from TAG_MAX_CARGO_PLUS_HEADER_WRITE ? #30

Closed

Description

@bradcar

It looks like in shtp.c it gets the advertisement value of TAG_MAX_CARGO_PLUS_HEADER_WRITE, but then it subtracts the SHTP_HDR_LEN (=4) from value return. But the tag names implies it should have the header length in it? Why is this?

In Line 460:

            case TAG_MAX_CARGO_PLUS_HEADER_WRITE:
                x = readu16(val) - SHTP_HDR_LEN;
            
                if (x < SH2_HAL_MAX_PAYLOAD_OUT) {
                    pShtp->outMaxPayload = x;
                }
                break;

Activity

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

Metadata

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