Commit 550a7081 authored by Dafydd Harries's avatar Dafydd Harries

update comments

darcs-hash:20070216111757-c9803-4ac014cfa2374d6a4e1984bfda292240dbe7e634.gz
parent a00367b2
...@@ -352,6 +352,7 @@ nice_agent_add_local_host_candidate ( ...@@ -352,6 +352,7 @@ nice_agent_add_local_host_candidate (
nice_rng_generate_bytes_print (rng, 8, candidate->password); nice_rng_generate_bytes_print (rng, 8, candidate->password);
nice_rng_free (rng); nice_rng_free (rng);
/* allocate socket */
/* XXX: handle error */ /* XXX: handle error */
if (!nice_udp_socket_factory_make (agent->socket_factory, if (!nice_udp_socket_factory_make (agent->socket_factory,
&(candidate->sock), address)) &(candidate->sock), address))
...@@ -512,7 +513,7 @@ nice_agent_add_remote_candidate ( ...@@ -512,7 +513,7 @@ nice_agent_add_remote_candidate (
candidate = nice_candidate_new (type); candidate = nice_candidate_new (type);
candidate->stream_id = stream_id; candidate->stream_id = stream_id;
candidate->component_id = component_id; candidate->component_id = component_id;
/* do remote candidates need IDs? */ /* XXX: do remote candidates need IDs? */
candidate->id = 0; candidate->id = 0;
candidate->addr = *addr; candidate->addr = *addr;
strncpy (candidate->username, username, sizeof (candidate->username)); strncpy (candidate->username, username, sizeof (candidate->username));
...@@ -615,8 +616,10 @@ _handle_stun_binding_request ( ...@@ -615,8 +616,10 @@ _handle_stun_binding_request (
goto ERROR; goto ERROR;
/* validate username */ /* validate username */
/* XXX: what about the case where the username uniquely identifies a remote /* XXX: Should first try and find a remote candidate with a matching
* candidate, but the transport address is not the one we expected? * transport address, and fall back to matching on username only after that.
* That way, we know to always generate a new remote candidate if the
* transport address didn't match.
*/ */
for (i = agent->remote_candidates; i; i = i->next) for (i = agent->remote_candidates; i; i = i->next)
...@@ -671,6 +674,10 @@ RESPOND: ...@@ -671,6 +674,10 @@ RESPOND:
#endif #endif
/* update candidate/peer affinity */ /* update candidate/peer affinity */
/* Note that @from might be different to @remote->addr; for ICE, this
* (always?) creates a new peer-reflexive remote candidate (§7.2).
*/
/* XXX: test case where @from != @remote->addr. */
component->active_candidate = local; component->active_candidate = local;
component->peer_addr = from; component->peer_addr = from;
......
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