summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabrice Bellet <fabrice@bellet.info>2019-10-03 13:28:36 +0200
committerFabrice Bellet <fabrice@bellet.info>2019-10-03 13:28:36 +0200
commit06b2dfceb5077f2073c27107133f321feb186961 (patch)
tree5dbdc91a094f803c189584b1b8c29c674474e4f4
parent746d16f12a81d015c78b7d9b6877319da76788cb (diff)
downloadpidgin-06b2dfceb5077f2073c27107133f321feb186961.tar.gz
jingle: build transport with udp candidates only
-rw-r--r--libpurple/protocols/jabber/jingle/rtp.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/libpurple/protocols/jabber/jingle/rtp.c b/libpurple/protocols/jabber/jingle/rtp.c
index c720c2a2ce..72a08395ee 100644
--- a/libpurple/protocols/jabber/jingle/rtp.c
+++ b/libpurple/protocols/jabber/jingle/rtp.c
@@ -87,9 +87,12 @@ jingle_rtp_candidates_to_transport(JingleSession *session, const gchar *type, gu
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;