From ffaed806c33a75e0426876fb9066a13c2dad71b5 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Mon, 7 Jun 2021 14:18:51 -0400 Subject: [PATCH] TT#91151 save raw protocol string Change-Id: I21bee5b28522ef01fa5902c0b1fc69e2cade8434 --- daemon/call.c | 2 ++ daemon/sdp.c | 1 + include/call.h | 2 ++ 3 files changed, 5 insertions(+) diff --git a/daemon/call.c b/daemon/call.c index 2dfdb342d..d438b65ae 100644 --- a/daemon/call.c +++ b/daemon/call.c @@ -2076,6 +2076,8 @@ static void __update_media_protocol(struct call_media *media, struct call_media } /* deduct protocol from stream parameters received */ + call_str_cpy(other_media->call, &other_media->protocol_str, &sp->protocol_str); + if (other_media->protocol != sp->protocol) { other_media->protocol = sp->protocol; /* If the endpoint changes the protocol, we reset the other side's diff --git a/daemon/sdp.c b/daemon/sdp.c index d7eeaeedb..51bc6ede3 100644 --- a/daemon/sdp.c +++ b/daemon/sdp.c @@ -1530,6 +1530,7 @@ int sdp_streams(const GQueue *sessions, GQueue *streams, struct sdp_ng_flags *fl sp->consecutive_ports = media->port_count; sp->num_ports = sp->consecutive_ports * 2; // only do *=2 for RTP streams? + sp->protocol_str = media->transport; sp->protocol = transport_protocol(&media->transport); sp->type = media->media_type_str; sp->type_id = media->media_type_id; diff --git a/include/call.h b/include/call.h index f26368fb2..536be8e0b 100644 --- a/include/call.h +++ b/include/call.h @@ -244,6 +244,7 @@ struct stream_params { struct endpoint rtcp_endpoint; unsigned int consecutive_ports; unsigned int num_ports; + str protocol_str; const struct transport_protocol *protocol; str format_str; GQueue sdes_params; // slice-alloc'd @@ -333,6 +334,7 @@ struct call_media { unsigned int unique_id; /* RO */ str type; enum media_type type_id; + str protocol_str; const struct transport_protocol *protocol; str format_str; sockfamily_t *desired_family;