MT#59962 AmSdp: print DTLS `fingerprint` & `setup`

When parsing SDP and not being in the path
of the media stream, `fingerprint` and `setup`
aren't considered as generic attributes and
are parsed into the dedicated SdpMedia fields.

So when preparing SDP to be printed and
to be sent out, take them also into account.

(Looks like was missed when reworking stuff
last time around media processing)

Change-Id: I48437d3587321a04395b70823207292590ea6523
mr26.2
Donat Zenichev 3 weeks ago
parent 59275e302d
commit 404c692992

@ -656,6 +656,13 @@ void AmSdp::print(string& body) const
out_buf += a_it->print();
}
// add DTLS attributes
if (!media_it->dtls_role.empty())
out_buf += "a=setup:" + media_it->dtls_role + "\r\n";
if (!media_it->dtls_hash.empty() && !media_it->dtls_fingerprint.empty())
out_buf += "a=fingerprint:" + media_it->dtls_hash + " " +
media_it->dtls_fingerprint + "\r\n";
// add ICE credentials
if (!media_it->ice_username.empty() && !media_it->ice_password.empty()) {
out_buf += "a=ice-ufrag:" + media_it->ice_username + "\r\n";
@ -2046,4 +2053,3 @@ static bool attr_check(std::string attr)
return false;
}
}

Loading…
Cancel
Save