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

[core] Reimplemented strerror to use static messages #1627

Merged
merged 4 commits into from
Jan 14, 2021

Conversation

ethouris
Copy link
Collaborator

Fixes #1585

The procedure to prepare the error message using std::string has been removed and replaced by a function that gets the pointer to a static array of characters that archive the message. The arrays with messages are generated from a comprehensive error message definitions using categories as defined originally in UDT.

Note that generation of the major/minor enums is not supported. After a new error is introduced, it should be added to both definitions, the enum in srt.h and in the generate-error-codes.tcl script, then the script should be run to regenerate strerror_defs.cpp file. Also all enum values must be perfectly monotonic, as a jump over empty code or verification of the monotonicness of the values is not implemented in the generator script.

@ethouris ethouris added [core] Area: Changes in SRT library core Type: Maintenance Work required to maintain or clean up the code labels Oct 26, 2020
@maxsharabayko maxsharabayko added this to the v1.4.3 milestone Oct 26, 2020
scripts/generate-error-types.tcl Outdated Show resolved Hide resolved
srtcore/strerror_defs.cpp Outdated Show resolved Hide resolved
srtcore/common.cpp Show resolved Hide resolved
@maxsharabayko maxsharabayko merged commit a5609d3 into Haivision:master Jan 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[core] Area: Changes in SRT library core Priority: Medium Type: Maintenance Work required to maintain or clean up the code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SIGABRT when calling srt_strerror from connect callback function
2 participants