MT#66271 ice init: refactor the func body a bit

Just squash passthrough with the !ice flag check,
because essentially doing exactly the same logic.

Change-Id: Ie34b41d52e7128b0fc361a6ad6483c07a0970700
pull/2200/head
Donat Zenichev 1 month ago
parent 39fd49b6c4
commit d590a62feb

@ -2222,12 +2222,8 @@ static void __dtls_logic(const sdp_ng_flags *flags,
static void __ice_init(struct call_media *media) {
if (MEDIA_ISSET(media, PASSTHRU)) {
ice_shutdown(&media->ice_agent);
return;
}
if (!MEDIA_ISSET(media, ICE)) {
/* not doing ICE anymore with this peer,
if (!MEDIA_ISSET(media, ICE) || MEDIA_ISSET(media, PASSTHRU)) {
/* for the ice part: not doing ICE anymore with this peer,
* discard this agent, so that ice offered again later starts afresh */
ice_shutdown(&media->ice_agent);
return;

Loading…
Cancel
Save