From b6a13dc62df0a526f9b54a530e66ed6bb647995b Mon Sep 17 00:00:00 2001 From: Christopher Vollick <0@psycoti.ca> Date: Fri, 19 Mar 2021 10:52:53 -0400 Subject: [PATCH] Content Transport is Always Created by Initiator The original code declared the content to be created by the "initiator" if this is an outgoing call, and "responder" if it's an incoming call, which makes sense if we assume we're always the content creator. But actually, in the clients I've looked at, that's not the case. In all cases, the initiator includes the initial content description in their session-initiate message. So actually, the creator is always the initiator, either us if we initiated, or them if they did. Most clients didn't seem to care who the creator was, but Gajim seems grumpy about it. --- channels/chan_motif.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/channels/chan_motif.c b/channels/chan_motif.c index 56fc574..80219f5 100644 --- a/channels/chan_motif.c +++ b/channels/chan_motif.c @@ -1349,7 +1349,7 @@ static void jingle_send_transport_info(struct jingle_session *session, const cha /* V1 protocol has the candidates directly in the session */ res = jingle_add_google_candidates_to_transport(session->rtp, jingle, audio_candidates, 0, session->transport, session->maxicecandidates); } else if ((audio = iks_new("content")) && (audio_transport = iks_new("transport"))) { - iks_insert_attrib(audio, "creator", session->outgoing ? "initiator" : "responder"); + iks_insert_attrib(audio, "creator", "initiator"); iks_insert_attrib(audio, "name", session->audio_name); iks_insert_node(jingle, audio); iks_insert_node(audio, audio_transport); @@ -1367,7 +1367,7 @@ static void jingle_send_transport_info(struct jingle_session *session, const cha if ((session->transport != JINGLE_TRANSPORT_GOOGLE_V1) && !res && session->vrtp) { if ((video = iks_new("content")) && (video_transport = iks_new("transport"))) { - iks_insert_attrib(video, "creator", session->outgoing ? "initiator" : "responder"); + iks_insert_attrib(video, "creator", "initiator"); iks_insert_attrib(video, "name", session->video_name); iks_insert_node(jingle, video); iks_insert_node(video, video_transport); -- 2.38.5