Commit c38c3326 authored by Madaro Livio's avatar Madaro Livio Committed by Youness Alaoui

The server reflexive candidate gathered from the turn server is

not valid if the socket is reliable (TCP).
The patch does not add the candidate to the local candidate list
if the socket is reliable.
parent e4eb5659
......@@ -2317,8 +2317,10 @@ static gboolean priv_map_reply_to_relay_request (NiceAgent *agent, StunMessage *
NiceAddress niceaddr;
NiceCandidate *relay_cand;
/* We also received our mapped address */
if (res == STUN_USAGE_TURN_RETURN_MAPPED_SUCCESS) {
/* Server reflexive candidates are only valid for UDP sockets */
if (res == STUN_USAGE_TURN_RETURN_MAPPED_SUCCESS &&
!nice_socket_is_reliable (d->nicesock)) {
/* We also received our mapped address */
nice_address_set_from_sockaddr (&niceaddr,
(struct sockaddr *) &sockaddr);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment