Skip to content

Commit

Permalink
[core] Fixed missing reject reason types (logging). (#2436)
Browse files Browse the repository at this point in the history
  • Loading branch information
maxsharabayko authored Aug 19, 2022
1 parent 8941831 commit 96d0c12
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion srtcore/handshake.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ const char* srt_rejectreason_name [] = {
"MESSAGEAPI",
"CONGESTION",
"FILTER",
"GROUP",
"TIMEOUT"
};
}

Expand All @@ -149,7 +151,7 @@ std::string srt::RequestTypeStr(UDTRequestType rq)
std::ostringstream rt;
rt << "ERROR:";
int id = RejectReasonForURQ(rq);
if (id < SRT_REJ_E_SIZE)
if (id < (int) Size(srt_rejectreason_name))
rt << srt_rejectreason_name[id];
else if (id < SRT_REJC_USERDEFINED)
{
Expand Down

0 comments on commit 96d0c12

Please sign in to comment.