Attention is currently required from: neels, laforge. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/30111 )
Change subject: fix sdp_msg_to_sdp_str(), never add fmtp for unset codec ......................................................................
Patch Set 1:
(1 comment)
File src/libmsc/sdp_msg.c:
https://gerrit.osmocom.org/c/osmo-msc/+/30111/comment/b067e8c2_cd38a3ea PS1, Line 271: if (!sdp_audio_codec_is_set(codec))
the previous code did not check if codec->subtype was a valid pointer at all, and unconditionally de […]
""" #define foreach_sdp_audio_codec(/* struct sdp_audio_codec* */ CODEC, \ /* struct sdp_audio_codecs* */ AC) \ for (CODEC = (AC)->codec; \ (CODEC - (AC)->codec) < OSMO_MIN((AC)->count, ARRAY_SIZE((AC)->codec)); \ CODEC++)
"""
""" bool sdp_audio_codec_is_set(const struct sdp_audio_codec *a) { return a && a->subtype_name[0]; } """
Can "codec" be really NULL here? I don't think so (maybe if &sdp->audio_codecs->codec==NULL, but is that really possible?)