libpurple/protocols/jabber/jingle/rtp.c

branch
port-changes-from-branch-2.x.y-to-default
changeset 40270
88bc25476614
parent 40269
334fd0d7c7e6
child 40275
bba8505129d5
--- a/libpurple/protocols/jabber/jingle/rtp.c	Thu Oct 03 11:16:08 2019 +0200
+++ b/libpurple/protocols/jabber/jingle/rtp.c	Thu Oct 03 13:28:36 2019 +0200
@@ -87,9 +87,12 @@
 
 	for (; candidates; candidates = g_list_next(candidates)) {
 		PurpleMediaCandidate *candidate = candidates->data;
-		gchar *id = jabber_get_next_id(jingle_session_get_js(session));
-		jingle_transport_add_local_candidate(transport, id, generation, candidate);
-		g_free(id);
+		if (purple_media_candidate_get_protocol(candidate) ==
+				PURPLE_MEDIA_NETWORK_PROTOCOL_UDP) {
+			gchar *id = jabber_get_next_id(jingle_session_get_js(session));
+			jingle_transport_add_local_candidate(transport, id, generation, candidate);
+			g_free(id);
+		}
 	}
 
 	return transport;

mercurial