From 3e1f286f24f5f0b9c9817320f0a85605b2e2035e Mon Sep 17 00:00:00 2001 From: Youness Alaoui Date: Wed, 9 Apr 2014 19:54:24 -0400 Subject: [PATCH] Do not return the socket to the app if we use ice-tcp, even in unreliable case --- agent/agent.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/agent/agent.c b/agent/agent.c index b2cac8b..05baba7 100644 --- a/agent/agent.c +++ b/agent/agent.c @@ -4150,6 +4150,10 @@ nice_agent_get_selected_socket (NiceAgent *agent, guint stream_id, if (component->selected_pair.local->type == NICE_CANDIDATE_TYPE_RELAYED) goto done; + /* ICE-TCP requires RFC4571 framing, even if unreliable */ + if (component->selected_pair.local->transport != NICE_CANDIDATE_TRANSPORT_UDP) + goto done; + nice_socket = (NiceSocket *)component->selected_pair.local->sockptr; if (nice_socket->fileno) g_socket = g_object_ref (nice_socket->fileno); -- 2.7.4