in sdp logging: add payload type number like 'AMR#111'

Related: SYS#5066
Change-Id: Icbb4e89ce2947bf787c3ee14e3e115d406e43de2
changes/82/28782/3
Neels Hofmeyr 9 months ago
parent 9a515e5db0
commit 99ab7c57da
  1. 3
      src/libmsc/sdp_msg.c
  2. 24
      tests/sdp_msg/sdp_msg_test.ok

@ -509,8 +509,11 @@ int sdp_audio_codec_to_str_buf(char *buf, size_t buflen, const struct sdp_audio_
{
struct osmo_strbuf sb = { .buf = buf, .len = buflen };
OSMO_STRBUF_PRINTF(sb, "%s", codec->subtype_name);
if (codec->rate != 8000)
OSMO_STRBUF_PRINTF(sb, "/%u", codec->rate);
if (codec->fmtp[0])
OSMO_STRBUF_PRINTF(sb, ":%s", codec->fmtp);
OSMO_STRBUF_PRINTF(sb, "#%d", codec->payload_type);
return sb.chars_needed;
}

@ -566,25 +566,25 @@ sdp_msg_intersection(a,b): a=ptime:20\r\n
test_select
[0]
SDP: AMR:octet-align=1,GSM,GSM-HR-08,GSM-EFR
Select: AMR:octet-align=1
SDP: AMR:octet-align=1,GSM,GSM-HR-08,GSM-EFR
SDP: AMR:octet-align=1#112,GSM#3,GSM-HR-08#111,GSM-EFR#110
Select: AMR:octet-align=1#112
SDP: AMR:octet-align=1#112,GSM#3,GSM-HR-08#111,GSM-EFR#110
[0] ok
[1]
SDP: AMR:octet-align=1,GSM,GSM-HR-08,GSM-EFR
Select: GSM
SDP: GSM,AMR:octet-align=1,GSM-HR-08,GSM-EFR
SDP: AMR:octet-align=1#112,GSM#3,GSM-HR-08#111,GSM-EFR#110
Select: GSM#3
SDP: GSM#3,AMR:octet-align=1#112,GSM-HR-08#111,GSM-EFR#110
[1] ok
[2]
SDP: AMR:octet-align=1,GSM,GSM-HR-08,GSM-EFR
Select: GSM-HR-08
SDP: GSM-HR-08,AMR:octet-align=1,GSM,GSM-EFR
SDP: AMR:octet-align=1#112,GSM#3,GSM-HR-08#111,GSM-EFR#110
Select: GSM-HR-08#111
SDP: GSM-HR-08#111,AMR:octet-align=1#112,GSM#3,GSM-EFR#110
[2] ok
[3]
SDP: AMR:octet-align=1,GSM,GSM-HR-08,GSM-EFR
Select: GSM-EFR
SDP: GSM-EFR,AMR:octet-align=1,GSM,GSM-HR-08
SDP: AMR:octet-align=1#112,GSM#3,GSM-HR-08#111,GSM-EFR#110
Select: GSM-EFR#110
SDP: GSM-EFR#110,AMR:octet-align=1#112,GSM#3,GSM-HR-08#111
[3] ok

Loading…
Cancel
Save