MGCP_Test: reject empty fmtp strings

When setting up an RTP flow the fmtp string is checked using isvalue(),
however this does not guard against empty fmtp strings. Rejecting empty
strings is especially useful in situations where the caller wants to
signal using "" that no fmtp string is present.

Change-Id: I2641a52a3b271681f4f2e424c34be12e125092d6
Related: OS#5688
This commit is contained in:
Philipp Maier 2023-02-07 11:17:24 +01:00 committed by dexter
parent 03f74d4132
commit 465115e777
1 changed files with 1 additions and 1 deletions

View File

@ -361,7 +361,7 @@ module MGCP_Test {
var SDP_attribute_list attributes;
attributes := { valueof(ts_SDP_rtpmap(flow.pt, flow.codec)), valueof(ts_SDP_ptime(20)) };
if (isvalue(flow.fmtp)) {
if (isvalue(flow.fmtp) and flow.fmtp != "") {
attributes := attributes & { valueof(ts_SDP_fmtp(flow.pt, flow.fmtp)) };
}