jingle: trim media attribute values

Movim has trailing whitespace around some of their media attributes

<source ssrc="1892824964" xmlns="urn:xmpp:jingle:apps:rtp:ssma:0">
  <parameter name="msid" value="{a98821d7-b298-4130-925a-ff6c510734c0} {f45dfc5c-2fa7-42b4-85e5-935e786b3feb} " xmlns="urn:xmpp:jingle:apps:rtp:ssma:0"/>
  <parameter name="cname" value="{63b1042b-5cb5-4411-b2a5-bdff92ae45be}" xmlns="urn:xmpp:jingle:apps:rtp:ssma:0"/>
</source>

our WebRTC doesn’t like that. We trim the value even though this seems to be a Movim bug.
This commit is contained in:
Daniel Gultsch 2023-09-30 07:52:51 +02:00
parent 86f46ece83
commit 6660877bcf
No known key found for this signature in database
GPG key ID: F43D18AD2A0982C2
2 changed files with 4 additions and 2 deletions

View file

@ -438,7 +438,9 @@ public class JingleConnectionManager extends AbstractConnectionManager {
Log.d(
Config.LOGTAG,
account.getJid().asBareJid()
+ ": no rtp session proposal found for "
+ ": no rtp session ("
+ sessionId
+ ") proposal found for "
+ from
+ " to deliver proceed");
if (remoteMsgId == null) {

View file

@ -291,7 +291,7 @@ public class SessionDescription {
throw new IllegalArgumentException(
"A source specific media attribute is missing its value");
}
mediaAttributes.put("ssrc", id + " " + parameterName + ":" + parameterValue);
mediaAttributes.put("ssrc", id + " " + parameterName + ":" + parameterValue.trim());
}
}