You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The design of the socket option handling of a group is a bit fragile with respect to data types.
The data type (optlen) returned by the API call (srt_getopt) may not match the type of the variable that stores the value. SRTO_PBKEYLEN, SRTO_PAYLOADSIZE and SRTO_CONNTIMEO store values in a variable of a different type compared to the one coming from the API (See PR #3066). Hence the importOption function with its call to getOptDefault to get optlen and value is not error-prone.
It would be better to at least use a certain type assigned to a specific option (int32_t, int64_t, bool, char*).
This way the importOption can be improved and take the assigned static type to the option symbol instead of relying on the field's type.
The text was updated successfully, but these errors were encountered:
The design of the socket option handling of a group is a bit fragile with respect to data types.
The data type (optlen) returned by the API call (
srt_getopt
) may not match the type of the variable that stores the value.SRTO_PBKEYLEN
,SRTO_PAYLOADSIZE
andSRTO_CONNTIMEO
store values in a variable of a different type compared to the one coming from the API (See PR #3066). Hence theimportOption
function with its call togetOptDefault
to get optlen and value is not error-prone.It would be better to at least use a certain type assigned to a specific option (int32_t, int64_t, bool, char*).
This way the
importOption
can be improved and take the assigned static type to the option symbol instead of relying on the field's type.The text was updated successfully, but these errors were encountered: