Skip to content

[BUG] srt_recv in file/message mode does not set SRT_ELARGEMSG when buffer is too small #2734

@markniebur

Description

@markniebur

Describe the bug
According to the docs, when a connection has been made in file/message mode, srt_recv should return SRT_ERROR and set SRT_ELARGEMSG when a message will not entirely fit in the provided buffer.

To Reproduce
Steps to reproduce the behavior:

  1. Create connection in file/message mode.
  2. Send large message to receiver
  3. Call srt_recv with a buffer too small to contain the entire message.
  4. Verify SRT_ERROR is not returned.

Expected behavior
SRT_ERROR should be returned and SRT_ELARGEMSG should be returned from srt_getlasterror.

Additional context
Additionally, the table entry for SRT_ELARGEMSG under srt_recv mentions the sending buffer, although that's not relevant for receiving.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: BugIndicates an unexpected problem or unintended behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions