Commit d3e16af2 authored by Kai Vehmanen's avatar Kai Vehmanen

Fixed a bug in adding peer-reflexive candidates to the list of local candidates.

darcs-hash:20070911172243-77cd4-ad1407a763afe2d14d3b7d41c09a8bc4d65c5f9c.gz
parent 64f97deb
...@@ -184,7 +184,10 @@ static void priv_assign_foundation (NiceAgent *agent, NiceCandidate *candidate) ...@@ -184,7 +184,10 @@ static void priv_assign_foundation (NiceAgent *agent, NiceCandidate *candidate)
NiceCandidate *n = k->data; NiceCandidate *n = k->data;
NiceAddress temp = n->base_addr; NiceAddress temp = n->base_addr;
/* note: ports are not be compared */ /* note: candidate must not on the local candidate list */
g_assert (candidate != n);
/* note: ports are not to be compared */
nice_address_set_port (&temp, nice_address_set_port (&temp,
nice_address_get_port (&candidate->base_addr)); nice_address_get_port (&candidate->base_addr));
...@@ -361,9 +364,9 @@ discovery_add_peer_reflexive_candidate ( ...@@ -361,9 +364,9 @@ discovery_add_peer_reflexive_candidate (
(NICE_CANDIDATE_TYPE_PREF_PEER_REFLEXIVE, 0, component_id); (NICE_CANDIDATE_TYPE_PREF_PEER_REFLEXIVE, 0, component_id);
candidate->stream_id = stream_id; candidate->stream_id = stream_id;
candidate->component_id = component_id; candidate->component_id = component_id;
priv_assign_foundation (agent, candidate);
candidate->addr = *address; candidate->addr = *address;
candidate->base_addr = base_socket->addr; candidate->base_addr = base_socket->addr;
priv_assign_foundation (agent, candidate);
/* step: link to the base candidate+socket */ /* step: link to the base candidate+socket */
candidate->sockptr = base_socket; candidate->sockptr = base_socket;
......
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
/* note: this is a private header to libnice */ /* note: this is a private header to libnice */
#include "stun/bind.h" #include "stun/bind.h"
#include "stream.h"
#include "agent.h" #include "agent.h"
typedef struct _CandidateDiscovery CandidateDiscovery; typedef struct _CandidateDiscovery CandidateDiscovery;
......
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